Method: Her::Model::Relation#create
- Defined in:
- lib/castle-her/model/relation.rb
#create(attributes = {}) ⇒ Object
Create a resource and return it
121 122 123 124 125 126 127 |
# File 'lib/castle-her/model/relation.rb', line 121 def create(attributes = {}) attributes ||= {} resource = @parent.new(@params.merge(attributes)) resource.save resource end |