Module: Forcast::Model::Modelo
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/forcast/models/modelo.rb
Instance Method Summary collapse
Instance Method Details
#create(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/forcast/models/modelo.rb', line 8 def create(params) self.attributes.each do |att| next if att[0] == 'id' self.write_attribute(att[0], params[att[0]]) end begin init(params) rescue ensure return true if self.save end end |
#errores ⇒ Object
23 24 25 |
# File 'lib/forcast/models/modelo.rb', line 23 def errores self.errors. end |