Sha256: 42150f9f46382138afd9553f47bc46e888350389574d571e5c3edca01e1ff85b

Contents?: true

Size: 513 Bytes

Versions: 15

Compression:

Stored size: 513 Bytes

Contents

class Tramway::Core::ExtendedApplicationForm < Tramway::Core::ApplicationForm
  class << self
    def properties(*args)
      @@extendable_properties ||= []
      @@extendable_properties += args
      super *args
    end
  end

    def initialize(model)
      @@extendable_properties.each do |prop|
        unless model.respond_to? prop
          model.class.define_method prop do
          end
          model.class.define_method "#{prop}=" do |value|
          end
        end
      end
      super
    end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tramway-core-1.13.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.13.0.2 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.13.0.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.13 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.12.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.12.0.2 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.12.0.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.12 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.11.2.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.11.2 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.11.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.11 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.10.3.1 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.10.3 app/forms/tramway/core/extended_application_form.rb
tramway-core-1.10.2.3 app/forms/tramway/core/extended_application_form.rb