You can put like this before_action check_something_with_redirect_if_any, except: [all actions except index]
but its very verbose :D On Thu, Jan 28, 2016 at 12:43 AM, Martin <myli...@kaffanke.at> wrote: > Hi there, > > If I want a before_action for only one action, like > > before_action check_something_with_redirect_if_any, only: :index > > Is there another way doing that? Or is this the recommend way? > > If not what else could work here? > > Thanks, > Martin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/2d11149f-2cba-4809-b769-ee9604636c11%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/2d11149f-2cba-4809-b769-ee9604636c11%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Karthikeyan A K https://cloud.openmailbox.org/index.php/s/u4sX065QRgjbJL2/download- My Ruby Book https://diasp.org/i/62de13a51047 - Join me on Diaspora -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJR%2B9kbuD0%3D3rNpErnk5yijp5CQ%3D8vYt7%3DiT%2BAys3ymeaHUD1A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.