Module: E9Attributes::Model
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/e9_attributes/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#build_all_record_attributes ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/e9_attributes/model.rb', line 45 def build_all_record_attributes self.class.record_attributes.each do |attr| params_method = "#{attr}_build_parameters" build_params = self.class.send(params_method) if self.class.respond_to?(params_method) send(attr).send(:build, build_params || {}) end end |