Created
June 28, 2012 21:52
-
-
Save PeteMichaud/3014201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"utf8"=>"✓", | |
"_method"=>"put", | |
"authenticity_token"=>"...", | |
"user"=>{"email"=>"[email protected]", | |
"password"=>"[FILTERED]", | |
"first_name"=>"Bob", | |
"last_name"=>"Jones", | |
"subscription"=>{"plan_id"=>"5"}}, | |
"password_confirmation"=>"[FILTERED]", | |
"commit"=>"Update User", | |
"id"=>"2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.fields_for @user.subscription_attributes do |fs| %> | |
<div class='control-group<%= " error" if @user.subscription.errors.has_key?(:plan_id) %>'> | |
<label class='control-label'>Plan</label> | |
<div class='controls'> | |
<%= fs.select :plan_id, @plans.map {|p| [p.plan_name, p.id] } %> | |
<% if @user.subscription.errors.has_key?(:plan_id) %> | |
<span class='help-inline'>Plan <%= @user.subscription.errors.get(:plan_id).first %></span> | |
<% end %> | |
</div> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment