Sha256: 97784810410faa76b57fac1fb1083dd4a9ee34a8bb45f9f19648d6f565fa532b

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

puts 'loading inline_forms...'

module InlineForms
  # convert type to migration_type
  DEFAULT_MIGRATION_TYPES = {
    :string => :string,
    :text => :text,
    :integer => :integer,
    :float => :float,
    :decimal => :decimal,
    :datetime => :datetime,
    :timestamp => :timestamp,
    :time => :time,
    :date => :date,
    :binary => :binary,
    :boolean => :boolean,
  }
  # convert type to field_type
  DEFAULT_FIELD_TYPES = {
    :string => :text_field,
    :text => :text_area,
    :integer => :text_field,
    :float => :text_field,
    :decimal => :text_field,
    :datetime => :datetime_select,
    :timestamp => :datetime_select,
    :time => :time_select,
    :date => :date_select,
    :binary => :text_field,
    :boolean => :check_box,

  }
  # define this so the helpers can add to it
  SPECIAL_MIGRATION_TYPES = {}
  # experimental
  RELATION_TYPES = {
    :belongs_to => :integer,
  }
  SPECIAL_RELATION_TYPES = {
    :associated => :associated,
  }
  
  class InlineFormsEngine < Rails::Engine
    initializer 'inline_forms.helper' do |app|
      ActionView::Base.send :include, InlineFormsHelper
    end
  end
end
# http://www.ruby-forum.com/topic/211017#927932

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
inline_forms-0.7.2 lib/inline_forms.rb
inline_forms-0.7.1 lib/inline_forms.rb
inline_forms-0.7.0 lib/inline_forms.rb
inline_forms-0.6.5 lib/inline_forms.rb
inline_forms-0.6.4 lib/inline_forms.rb
inline_forms-0.6.3 lib/inline_forms.rb
inline_forms-0.6.2 lib/inline_forms.rb
inline_forms-0.6.1 lib/inline_forms.rb
inline_forms-0.6.0 lib/inline_forms.rb