{"action":"created","issue":{"url":"https://api.github.com/repos/apotonick/cells/issues/311","labels_url":"https://api.github.com/repos/apotonick/cells/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/apotonick/cells/issues/311/comments","events_url":"https://api.github.com/repos/apotonick/cells/issues/311/events","html_url":"https://github.com/apotonick/cells/issues/311","id":98102161,"number":311,"title":"Filters / Callbacks not working in Cells 4","user":{"login":"dlo-ib","id":12966345,"avatar_url":"https://avatars.githubusercontent.com/u/12966345?v=3","gravatar_id":"","url":"https://api.github.com/users/dlo-ib","html_url":"https://github.com/dlo-ib","followers_url":"https://api.github.com/users/dlo-ib/followers","following_url":"https://api.github.com/users/dlo-ib/following{/other_user}","gists_url":"https://api.github.com/users/dlo-ib/gists{/gist_id}","starred_url":"https://api.github.com/users/dlo-ib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlo-ib/subscriptions","organizations_url":"https://api.github.com/users/dlo-ib/orgs","repos_url":"https://api.github.com/users/dlo-ib/repos","events_url":"https://api.github.com/users/dlo-ib/events{/privacy}","received_events_url":"https://api.github.com/users/dlo-ib/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T07:25:42Z","updated_at":"2015-07-30T18:12:15Z","closed_at":"2015-07-30T18:12:15Z","body":"Hi @apotonick!\r\n\r\nI've trying to use filters / callbacks in my cells with no success. In my first approach, I just got an \"undefined method `before_action'\" error, so I first tried including AbstractController::Callbacks and later, your \"cells-filters\" gem (even though I saw is pretty outdated and probably intended to use with Cells 3 or lower only).\r\n\r\nBoth solutions make the \"undefined method\" error dissapear but nothing else. Whether I use \"_action\" or \"_filter\" syntax, the result is apparently the same: the callback method is never called.\r\n\r\nThis is an example of all this:\r\n\r\n```ruby\r\n# test_cell.rb\r\n\r\nclass TestCell < Cell::ViewModel\r\n  # include Cell::Filters\r\n  include AbstractController::Callbacks\r\n\r\n  before_action :add_name\r\n  before_filter :add_name\r\n\r\n  def show\r\n    p @name\r\n    p '2222222222222222222222222'\r\n    render\r\n  end\r\n\r\n  private\r\n\r\n    def add_name\r\n      @name = 'Michael Jackson'\r\n      p '1111111111111111111111111'\r\n    end\r\nend\r\n```\r\n\r\n```ruby\r\n# show.haml\r\n\r\n%p\r\n  Hi! My name is #{@name}\r\n```\r\n\r\nAm I the first one using this on Cells? or what am I doing wrong?\r\n\r\nHelp please, this is driving me nuts! :("},"comment":{"url":"https://api.github.com/repos/apotonick/cells/issues/comments/126422013","html_url":"https://github.com/apotonick/cells/issues/311#issuecomment-126422013","issue_url":"https://api.github.com/repos/apotonick/cells/issues/311","id":126422013,"user":{"login":"apotonick","id":10406,"avatar_url":"https://avatars.githubusercontent.com/u/10406?v=3","gravatar_id":"","url":"https://api.github.com/users/apotonick","html_url":"https://github.com/apotonick","followers_url":"https://api.github.com/users/apotonick/followers","following_url":"https://api.github.com/users/apotonick/following{/other_user}","gists_url":"https://api.github.com/users/apotonick/gists{/gist_id}","starred_url":"https://api.github.com/users/apotonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apotonick/subscriptions","organizations_url":"https://api.github.com/users/apotonick/orgs","repos_url":"https://api.github.com/users/apotonick/repos","events_url":"https://api.github.com/users/apotonick/events{/privacy}","received_events_url":"https://api.github.com/users/apotonick/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T18:12:15Z","updated_at":"2015-07-30T18:12:15Z","body":"This is no longer supported in Cells, because we think that you can also do this with simple method overriding. Soooorry! :beers: "}}