Module: ActiveRecord::MassAssignmentSecurity::Core
- Included in:
- Base
- Defined in:
- lib/active_record/mass_assignment_security/core.rb
Instance Method Summary collapse
Instance Method Details
#initialize(attributes = nil, options = {}) {|_self| ... } ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_record/mass_assignment_security/core.rb', line 5 def initialize(attributes = nil, = {}) @new_record = true self.class.define_attribute_methods @attributes = self.class._default_attributes.deep_dup init_internals initialize_internals_callback # +options+ argument is only needed to make protected_attributes gem easier to hook. init_attributes(attributes, ) if attributes yield self if block_given? _run_initialize_callbacks end |