Class: ActionBlocks::IntegerFieldBuilder

Inherits:
FieldBlock show all
Defined in:
lib/action_blocks/builders/model_builder.rb

Instance Attribute Summary

Attributes inherited from FieldBlock

#field_type, #parent_model

Attributes inherited from BaseBuilder

#dsl_delegate, #id

Instance Method Summary collapse

Methods inherited from FieldBlock

#key, #match_requirements, #select_requirements

Methods inherited from BlockType

#is_block?, #type

Methods inherited from BaseBuilder

#after_build, #after_load, array_fields, block_type, builds, builds_many, delegate_class, #evaluate, #freeze, includes_scheme_helpers, #initialize, #is_block?, #key, references, sets, sets_many, #ui_reference, #valid?

Constructor Details

This class inherits a constructor from ActionBlocks::BaseBuilder

Instance Method Details

#before_build(parent, *args) ⇒ Object



552
553
554
555
# File 'lib/action_blocks/builders/model_builder.rb', line 552

def before_build(parent, *args)
  super(parent, *args)
  @field_type = 'integer'
end

#hashify(user) ⇒ Object



557
558
559
560
561
562
# File 'lib/action_blocks/builders/model_builder.rb', line 557

def hashify(user)
  {
    type: :integer,
    id: @id
  }
end