class ActionBlocks::DatetimeFieldBuilder
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 479 def before_build(parent, *args) super(parent, *args) @field_type = 'datetime' end
hashify(user)
click to toggle source
# File lib/action_blocks/builders/model_builder.rb, line 492 def hashify(user) { type: :datetime, id: @id } end
select_requirements(select_as_prefix = nil)
click to toggle source
# File lib/action_blocks/builders/model_builder.rb, line 484 def select_requirements(select_as_prefix = nil) { field_name: [select_as_prefix,@id].compact.join('_').to_sym, path: [@id], function: -> (*args) { timezone('US/Central', *args) } } end