class ActionBlocks::IdentityFieldBuilder
Public Instance Methods
before_build(parent, *args)
click to toggle source
Calls superclass method
ActionBlocks::FieldBlock#before_build
# File lib/action_blocks/builders/model_builder.rb, line 319 def before_build(parent, *args) @field_type = 'identity' @id = :id super(parent, :id) end
hashify(user)
click to toggle source
# File lib/action_blocks/builders/model_builder.rb, line 338 def hashify(user) { type: :identity, id: @id, key: @key } end
match_requirements(select_as_prefix = nil)
click to toggle source
# File lib/action_blocks/builders/model_builder.rb, line 332 def match_requirements(select_as_prefix = nil) { path: [select_as_prefix, @id].compact } end
select_requirements(select_as_prefix = nil)
click to toggle source
# File lib/action_blocks/builders/model_builder.rb, line 325 def select_requirements(select_as_prefix = nil) { field_name: [select_as_prefix,@id].compact.join('_').to_sym, path: [@id] } end