Sha256: 77b2fe05178a4d5e2d2e27e7b5327d970a883bc27618f18bcb3170d447c4793d

Contents?: true

Size: 330 Bytes

Versions: 15

Compression:

Stored size: 330 Bytes

Contents

module Wheels
  module ActiveRecordExtensions
    def form_attributes(attrib={}, options={})
      @form_attributes = attrib
      class_eval do
        def form_fields
          self.class.instance_variable_get('@form_attributes')
        end
      end
    end
  end
end
ActiveRecord::Base.extend Wheels::ActiveRecordExtensions

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wheels-0.1.30 lib/wheels/active_record_extensions.rb
wheels-0.1.28 lib/wheels/active_record_extensions.rb
wheels-0.1.27 lib/wheels/active_record_extensions.rb
wheels-0.1.25 lib/wheels/active_record_extensions.rb
wheels-0.1.24 lib/wheels/active_record_extensions.rb
wheels-0.1.23 lib/wheels/active_record_extensions.rb
wheels-0.1.22 lib/wheels/active_record_extensions.rb
wheels-0.1.21 lib/wheels/active_record_extensions.rb
wheels-0.1.20 lib/wheels/active_record_extensions.rb
wheels-0.1.19 lib/wheels/active_record_extensions.rb
wheels-0.1.18 lib/wheels/active_record_extensions.rb
wheels-0.1.17 lib/wheels/active_record_extensions.rb
wheels-0.1.16 lib/wheels/active_record_extensions.rb
wheels-0.1.15 lib/wheels/active_record_extensions.rb
wheels-0.1.14 lib/wheels/active_record_extensions.rb