I have to call same user_authenticate function for destroy and update,
But when i give like this
*
before_filter :user_authenticate, :only => [:destroy]
before_filter :user_authenticate, :only => [:update]*

This was not working, but when i gave like this
*before_filter :user_authenticate, :only => [:destroy,:update]. this
working.*

what is the comparison with these 2 method, also i searched for this only,
and except.but i didn't get any correct explanation.

Any help?

Thankyou
vishnu

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/CspgZyrJqSYJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Apr 12, 2012 at 9:56 am

    On 12 April 2012 08:22, amvis wrote:
    I have to call same  user_authenticate function  for destroy and update, But
    when i give like this

    before_filter :user_authenticate, :only => [:destroy]
    before_filter :user_authenticate, :only => [:update]

    This was not working, but when i gave like this
    before_filter :user_authenticate, :only => [:destroy,:update]. this working.

    what is the comparison with these  2 method, also i searched for this only,
    and except.but i didn't get any correct explanation.
    I have not looked at the code (which you could do yourself) but I am
    guessing that the second one which says only do it on update (so don't
    do it on destroy) overrides the first one. Is that what you see in
    practice?

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 12, '12 at 7:22a
activeApr 12, '12 at 9:56a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Amvis: 1 post Colin Law: 1 post

People

Translate

site design / logo © 2021 Grokbase