Created
June 28, 2012 21:52
-
-
Save PeteMichaud/3014201 to your computer and use it in GitHub Desktop.
Revisions
-
PeteMichaud created this gist
Jun 28, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ {"utf8"=>"✓", "_method"=>"put", "authenticity_token"=>"...", "user"=>{"email"=>"email@email.com", "password"=>"[FILTERED]", "first_name"=>"Bob", "last_name"=>"Jones", "subscription"=>{"plan_id"=>"5"}}, "password_confirmation"=>"[FILTERED]", "commit"=>"Update User", "id"=>"2"} This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <%= 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 %>