Commit Graph

20 Commits

Author SHA1 Message Date
Felipe Renan ffc13c9925 Remove support from Rails 4.0, 4.1 and 4.2
We won't support version less than Rails 5.0 anymore in Simple Form.
2018-02-16 13:26:07 -02:00
Rob Biedenharn bdd57f807c Remove ActiveRecord dependence; manually use as: :text 2017-05-10 12:46:52 -04:00
Rob Biedenharn 1ef814f901 Include CI against rails-5-1-stable 2017-04-28 14:24:53 -04:00
Justin Coyne 6f7c2132b2 Add Ruby 2.4 to the test matrix
Ensure that old rubies use Nokogiri 1.6.8
Fixes #1453
2017-01-05 12:31:55 -06:00
Lucas Mazza 23728c765e
Update `country_select` dependency on `5-0-stable` Gemfile. 2016-08-12 17:02:06 -03:00
Olivier Lacan 2b5d4176d9
Simplify check for decimal_or_float?
This simplification should make it compatible with Rails 5's new
Attributes API without requiring a major refactor of the FormBuilder class.

The motivation for this commit originated in #1342.

@rafaelfranca mentioned that we should be using the new type_for_attribute interface
to determine the precise type of a column instead. At first I used the interface directly like
this:

      def decimal_or_float?
        if object.respond_to?(:type_for_attribute)
          type = object.type_for_attribute(column.name.to_s).type
          type == :float || :decimal
        else
          column.number? && column.type != :integer
        end
      end

I then realized that we're already asking the column object directly for the type, so
why not simple check for the two types we care about and implement the method in a much
more straightforward *and* backward-compatible way? I ended up with this:

      def decimal_or_float?
        column.type == :float || :decimal
      end

I could be missing something obvious but this is green in my Rails 5.0.0 app. The tests mock out the now removed number? ActiveModel method
so I had to remove that:
method: 1c389f6559/test/support/models.rb (L3-L8)
2016-08-12 16:38:42 -03:00
Lucas Mazza bd71279050
Test against Rails 5.0.0 by default
The `DateTimeInput` `type` assertions test was relaxed due rails/rails#25469, as
it only affects Rails 5+ apps.
2016-07-01 14:28:50 -03:00
Lucas Mazza 1db2bca5d9 Test against the Rails 5 beta release. 2015-12-20 21:22:12 -02:00
Lucas Mazza 6b62727a6a Test against Rails 5. 2015-10-07 21:03:07 -03:00
Rafael Mendonça França c26b26d679 Add a new gemfile with Rails 4-2-stable branch 2014-12-16 16:12:41 -02:00
Rafael Mendonça França 8a50572e74 Rails master is now the default gemfile 2014-03-10 15:23:16 -03:00
Rafael Mendonça França 98937599ec Run tests against Rails 4-1-stable 2014-03-10 14:35:31 -03:00
Peter M. Goldstein 3bcb1c9a08 Update Gemfiles to allow Rubinius and JRuby to run. Add those VMs to .travis.yml. Add begin/rescue to Rakefile to accomodate platforms that don't have RDocTask. 2013-12-15 18:26:41 -08:00
Andriel Nuernberg 8e6c383fe6 Let Devise play with Rails master 2013-12-06 14:59:25 -02:00
Rafael Mendonça França bdf36610b1 Remove the test gemfiles 2012-12-26 21:14:21 -03:00
Carlos Antonio da Silva 9a66675b0b Bundle update, change mocha require
Mocha is still being required somewhere else, which is showing a
deprecation warning when running tests.
2012-11-11 21:40:40 -02:00
Rafael Mendonça França 7b368ddb9f Good bye ruby-debug 💣 2012-02-22 15:09:28 -02:00
Rafael Mendonça França fca99746d2 Use country_select gem instead of the plugin
Rails 3.2 deprecated the Rails plugins. So we have to use gems.
2012-01-30 16:14:58 -02:00
Lucas Mazza bcc4f1eada add the `--bootstrap` option to the simple_form:install generator 2012-01-24 16:23:50 -02:00
Rafael Mendonça França ab127f683e Add more Gemfiles to travis-ci build matrix 2012-01-11 14:40:38 -03:00