before_action ... except: action still being called on action in except list

18 views
Skip to first unread message

fugee ohu

unread,
Jan 15, 2016, 9:12:44 PM1/15/16
to Ruby on Rails: Talk
i have `  before_action :get_conversation, except: [:index, :empty_trash]` in my controller but get_conversation is being called on empty_trash

Hassan Schroeder

unread,
Jan 15, 2016, 11:12:28 PM1/15/16
to rubyonrails-talk
On Fri, Jan 15, 2016 at 6:12 PM, fugee ohu <fuge...@gmail.com> wrote:
> i have ` before_action :get_conversation, except: [:index, :empty_trash]`
> in my controller but get_conversation is being called on empty_trash

We feel your pain.

However, code and a failing test would be way relevant :-)

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

fugee ohu

unread,
Jan 15, 2016, 11:37:52 PM1/15/16
to Ruby on Rails: Talk

 Thanks, I got it fixed There was a 'method: :delete' in the form_tag that didn't belong there After I removed it, the form defaulted to the post method and the routes worked fine ~ thanks again, fugee
Reply all
Reply to author
Forward
0 new messages