Jared Moody wrote:
> I have a form that allows a User to add/edit the additional Users or
> LoginUsers to/on their account, but the wrong validations are run when
> updating a User to be a Login user or vice-versa.
> ...
>     # revoking login privledges
>     if @user.is_a?(LoginUser) && !params[:allow_login]
>       #switch the type here, tried a few different things but none work
>       @user[:type] = "User"
         @user.save_without_validation!
         @user = User.find(@user.id)
>     end

Try adding the above two lines.

-- 
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to