Ruby on Rails
Monday, December 28, 2015
my _form.html.erb was rendered by new.html.erb; from my form:
<%= form_for(@profile) do |f| %>
from firefox->tools->web developer->page source
the create action:
def create
@profile = Profile.new(profile_params)
...
so what's wrong
-- <%= form_for(@profile) do |f| %>
from firefox->tools->web developer->page source
<form class="new_profile" id="new_profile_0" action="/profiles" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="COqGl7mSxKUqj0cTSqLfPJ4Ov40+Zv8iXhhdteiPDrNL6aD9OI+o0LxKAZ+rCy/zrDO0ROB1+yA3bEaZ8IHfQw==" />and then when submitted raises ActiveRecord::RecordNotUnique in ProfilesController#create
the create action:
def create
@profile = Profile.new(profile_params)
...
so what's wrong
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/msgid/rubyonrails-talk/cb666efb-26d2-462a-bacb-27713f80e064%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment