I currently have a link to a Login screen, but its a separate page
althogether. I have created a partial that is just the login box and
password, and would like that partial to appear at a place on the page
when the user clicks the link. Anyone know where I can find out how to
do this?
You use link_to_remote instead of link_to… then you have the destination be a controller that just renders your partial and puts the result in that div. Pretty easy actually.
Then in your controller, assuming you have a partial at app/views//login/_form.rhtml you just do
displays the login form partial… used by an AJAX request
def show_login_form
render :partial=>“login/form”
end
You can do a lot more cool stuff though… There’s a really good O’Reilly shortcut on RJS, but sadly I forget what it’s called… I think it’s RJS Templates for Rails or something. Quality read, and helps you get started quite quickly.