Module: Elasticsearch::Persistence::Model::Store::ClassMethods
- Defined in:
- lib/elasticsearch/persistence/model/store.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#create(attributes, options = {}) ⇒ Object
Creates a class instance, saves it, if validations pass, and returns it.
Instance Method Details
#create(attributes, options = {}) ⇒ Object
Creates a class instance, saves it, if validations pass, and returns it
19 20 21 22 23 24 25 |
# File 'lib/elasticsearch/persistence/model/store.rb', line 19 def create(attributes, ={}) object = self.new(attributes) object.run_callbacks :create do object.save() object end end |