Created
October 27, 2013 21:12
-
-
Save px-amaac/7187960 to your computer and use it in GitHub Desktop.
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 characters
<%= f.fields_for :urls do |url_fields| %> | |
<div class="field"> | |
<%= f.label :url %><br> | |
<%= url_fields.text_field :url %> | |
</div> | |
<% end %> |
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 characters
def new | |
@digital_object_identifier = current_user.digital_object_identifiers.build | |
@digital_object_identifier.urls << Url.new | |
end |
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 characters
"urls_attr | |
ibutes"=>{"0"=>{"url"=>"www.something.com"}}}, "commit"=>"Create Digital object | |
identifier"} | |
←[1m←[35mUser Load (1.0ms)←[0m SELECT "users".* FROM "users" WHERE "users"."i | |
d" = 2 ORDER BY "users"."id" ASC LIMIT 1 | |
Unpermitted parameters: urls_attributes |
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 characters
params.require(:digital_object_identifier).permit(:string_identifier, :integer_identifier, :description, url_attributes: [ :url ] ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment