On Mar 20, 12:00 pm, Jignesh Wadia <[email protected]>
wrote:
> But how can I fix that error message? Database information is updating
> properly but page is redirecting to HTTP 500 Internal server error page
> and I am unable to fix this error. Please help me how can i fix it. I am
> using code below to be updating model entry... and same code works
> properly for other modules.
>
> # PUT /models/1
> # PUT /models/1.xml
> def update
> @model = Model.find(params[:id], :include=>:user)
>
> respond_to do |format|
> if @model.update_attributes(params[:model])
> @model.user.roles.clear
> @model.user.roles << Role.find_or_create_by_name("model")
> #flash[:notice] = "Model was successfully updated."
> #format.html { redirect_to([:admin, @model]) }
> #format.xml { head :ok }
in this branch you're not telling rails what to do - you've commented
out all your format.bla calls
Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---