Module: Formtastic::Inputs::Base::Database

Included in:
Formtastic::Inputs::Base
Defined in:
lib/formtastic/inputs/base/database.rb

Instance Method Summary collapse

Instance Method Details

#columnObject



6
7
8
9
10
11
12
13
# File 'lib/formtastic/inputs/base/database.rb', line 6

def column
  if object.respond_to?(:column_for_attribute)
    # Remove deprecation wrapper & review after Rails 5.0 ships
    ActiveSupport::Deprecation.silence do
      object.column_for_attribute(method)
    end
  end
end

#column?Boolean



15
16
17
# File 'lib/formtastic/inputs/base/database.rb', line 15

def column?
  !column.nil?
end