All Versions
53
Latest Version
Avg Release Cycle
178 days
Latest Release
-

Changelog History
Page 3

  • v2.0.5 Changes

    September 14, 2015
    • ActiveModel::Validator now delegates all methods properly to the form. It used to crashed with properties called format or other private Object methods.
    • Simpleform will now properly display fields as required, or not (by introducion ModelReflections::validators_on).
    • 0๏ธโƒฃ The :default option is not copied into the deserializer anymore from the schema. This requires disposable 0.1.11.
  • v2.0.4 Changes

    • ๐Ÿ”€ #sync and #save with block now provide HashWithIndifferentAccess in Rails.
  • v2.0.3 Changes

    • Form#valid? is private now. Sorry for the inconvenience, but this has never been documented as public. Reason is that the only entry point for validation is #validate to give the form as less public API as possible and minimize misunderstandings.

      The idea is that you set up the object graph before/while #validate and then invoke the validators once.

    • ๐Ÿ›  Fixed AM to find proper i18n for error messages. This happens by injecting the form's model_name into the Validator object in ActiveModel.

  • v2.0.2 Changes

    • ๐Ÿ›  Fix unique: true validation in combination with Composition.
    • ๐Ÿ‘‰ Use newest Disposable 0.1.9 which does not set :pass_options anymore.
  • v2.0.1 Changes

    • ๐Ÿ›  Fix ActiveModel::Validations where translations in custom validations would error. This is now handled by delegating back to the Validator object in Reform.
  • v2.0.0 Changes

    • The ::reform_2_0! is no longer there. Guess why.
    • Again: :empty doesn't exist anymore. You can choose from :readable, :writeable and :virtual.
    • When using :populator the API to work against the form has changed. ruby populator: lambda { |fragment, index, args| songs[index] or songs[index] = args.binding[:form].new(Song.new) }

    is now

       populator: lambda { |fragment, index, args|
         songs[index] or songs.insert(index) = Song.new
       }
    
    You don't need to know about forms anymore, the twin handles that using the [Twin](https://github.com/apotonick/disposable) API..
    
    • ๐Ÿšš :as option removed. Use :from.
    • With Composition included, Form#model would give you a composition object. You can grab that using Form#mapper now.
    • โšก๏ธ Form#update! is deprecated. It still works but will remind you to override #present! or use pre-populators as described here and in the Trailblazer book, chapter "Nested Forms".
    • Forms do not include ActiveModel::Validations anymore. This has polluted the entire gem and is not encapsulated in Validator. Consider using Lotus Validations instead.
    • โšก๏ธ Validation inheritance with ActiveModel::Validations is broken with Rails 3.2 and 4.0. Update Rails or use the Lotus validations.
  • v2.0.0.rc3 Changes

    • ๐Ÿ›  Fix an annoying bug coming from Rails autoloader with validations and model_name.
  • v1.2.6 Changes

    • โž• Added :prepopulate to fill out form properties for presentation. Note that you need to call Form#prepopulate! to trigger the prepopulation.
    • โž• Added support for DateTime properties in forms. Until now, we were ignoring the time part. Thanks to @gdott9 for fixing this.
  • v1.2.5 Changes

    • โž• Added Form#options_for to have access to all property options.
  • v1.2.4 Changes

    • โž• Added Form#readonly? to find out whether a field is set to writeable. This is helpful for simple_form to display a disabled input field.

      property :title, writeable: false
      

      In the view, you can then use something along the following code.

      f.input :title, readonly: @form.readonly?(:title)