Ruby on Rails
Monday, February 18, 2013
The default method for a form_tag is a POST.
But in your controller you are only showing a the #new method (GET). Should it not be #create?
Op maandag 18 februari 2013 22:15:28 UTC+1 schreef Ruby-Forum.com User het volgende:
I'm trying to create an Login Form, that is retrieved via Ajax and--
creates a Session via Ajax.
In my Login Form I typed
<%= form_tag sessions_path, :remote => true do %>
Session Controller
def new
respond_to do |format|
format.js
end
end
And in my session vier directory I created a js.erb
$(".login").update("<%= escape_javascript(render('sessions/new')) %>");
the login class spans the whole content of my login form, but trying to
open the login form only throws me a completely blank page :/
Is my jquery function not allright, or am I missing out on something?
I appreciate any kind of help!
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HMJbAq-t4OQJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment