I'm trying to figure out the best way to insert content into a light box using rails UJS. I have a link that looks like this:
<%= link_to "login", login_path, :remote => true %>
Which produces html as such:
<a data-remote="true" href="/login">login</a>
So this all works great, and I've created the view file: user_sessions/new.js.erb
which also loads just fine, but my question what is the preferred method of inserting appending the html into the page? Like I already have the login form on the non-js page, so can't I just load that partial into the page?
Any ideas would be very welcomed.