I have a situation where I need my ajaxed login popup to route to a
different page than the default route.  Specifically this situation is
if they are trying to message a user and are not signed in, I want to
show the login, and then route them to the profile that they were
viewing and not make them have to find it again.  The way I was
thinking about doing it is to use a partial to add a hidden field that
would contain the id of the user that is being viewed and use this id
to render that profile instead of routing to the logged in users
profile.

The thing is that the partial is going to look the same as the regular
which is not good DRY policy, but I dont know how else to get the user
id for the hidden field into the login popup.  Something like:

page.replace_html "login", :partial => 'layouts/
login_for_diff_route', :locals => {:profile_id => @profile_id}

I cant really think of any other way to do it.  Looking for any
suggestions/advice/insights.  Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to