Hello,
I was wondering if it was possible to pass objects between methods in
the controllers - or whether you can only pass strings??
example:
def method_one
@object = Model.find(params[:id)
redirect_to :action => "method_to", :object => @object
end
def method_two
@object = params[:object]
end
The question is basically - can i access the object in method_two?
Or do i have to just pass the model id to method two and do another
query to find the model object?
Which is best practice?
--
Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---