All Versions
53
Latest Version
Avg Release Cycle
178 days
Latest Release
-
Changelog History
Page 3
Changelog History
Page 3
-
v2.0.5 Changes
September 14, 2015ActiveModel::Validator
now delegates all methods properly to the form. It used to crashed with properties calledformat
or other privateObject
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 provideHashWithIndifferentAccess
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 theValidator
object in ActiveModel.
-
v2.0.2 Changes
- ๐ Fix
unique: true
validation in combination withComposition
. - ๐ Use newest Disposable 0.1.9 which does not set
:pass_options
anymore.
- ๐ Fix
-
v2.0.1 Changes
- ๐ Fix
ActiveModel::Validations
where translations in custom validations would error. This is now handled by delegating back to theValidator
object in Reform.
- ๐ Fix
-
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 usingForm#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 inValidator
. Consider using Lotus Validations instead. - โก๏ธ Validation inheritance with
ActiveModel::Validations
is broken with Rails 3.2 and 4.0. Update Rails or use theLotus
validations.
- The
-
v2.0.0.rc3 Changes
- ๐ Fix an annoying bug coming from Rails autoloader with validations and
model_name
.
- ๐ Fix an annoying bug coming from Rails autoloader with validations and
-
v1.2.6 Changes
- โ Added
:prepopulate
to fill out form properties for presentation. Note that you need to callForm#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.
- โ Added
-
v1.2.5 Changes
- โ Added
Form#options_for
to have access to all property options.
- โ Added
-
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)