Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: hudson-gev-art/formtastic
...
head fork: hudson-gev-art/formtastic
Checking mergeability… Don’t worry, you can still create the pull request.
  • 11 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+2.3.0.rc2
+
+* deprecate support for Rails < 3.2
+
2.3.0.rc
* Updated to support Rails 4
View
8 README.textile
@@ -16,9 +16,9 @@ h2. Documentation & Support
h2. Compatibility
-* Formtastic 2.1.x is Rails 3.x compatible
-* Formtastic 2.0.x is Rails 3.0.x and 3.1.x compatible only
-* Formtastic 1.x is compatible with both Rails 2 and 3, and is being maintained for bug fixes in the the "1.2-stable branch":https://github.com/justinfrench/formtastic/tree/1.2-stable. View the README in that branch for installation instructions, etc.
+* Formtastic 4 (master on Github) will require Rails 3.2 minimum
+* Formtastic 2.3 is Rails 3 and Rails 4 compatible (Rails < 3.2 is deprecated)
+* Formtastic 2.1 & 2.2 is Rails 3 and Rails 4 compatible
* Formtastic, much like Rails, is very ActiveRecord-centric. Many are successfully using other ActiveModel-like ORMs and objects (DataMapper, MongoMapper, Mongoid, Authlogic, Devise...) but we're not guaranteeing full compatibility at this stage. Patches are welcome!
@@ -65,7 +65,7 @@ h2. It's awesome because...
* It can handle @belongs_to@ associations (like Post belongs_to :author), rendering a select or set of radio inputs with choices from the parent model.
* It can handle @has_many@ and @has_and_belongs_to_many@ associations (like: Post has_many :tags), rendering a multi-select with choices from the child models.
-* It's Rails 3 compatible (including nested forms).
+* It's Rails 3/4 compatible (including nested forms).
* It has internationalization (I18n)!
* It's _really_ quick to get started with a basic form in place (4 lines), then go back to add in more detail if you need it.
* There's heaps of elements, id and class attributes for you to hook in your CSS and JS.
View
7 lib/formtastic.rb
@@ -14,6 +14,13 @@ module Formtastic
autoload :Localizer
autoload :Util
+ # Deprecate support for Rails < 3.2
+ if Util.deprecated_version_of_rails?
+ ::ActiveSupport::Deprecation.warn(
+ "Support for Rails 3.0 and 3.1 will be dropped from Formtastic 3.0",
+ caller)
+ end
+
# @private
class UnknownInputError < NameError
end
View
4 lib/formtastic/util.rb
@@ -24,6 +24,10 @@ def html_safe(text)
def rails3?
::Rails::VERSION::MAJOR == 3
end
+
+ def deprecated_version_of_rails?
+ const_defined?(:Rails) && ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR < 2
+ end
end
end
View
2  lib/formtastic/version.rb
@@ -1,3 +1,3 @@
module Formtastic
- VERSION = "2.3.0.rc"
+ VERSION = "2.3.0.rc2"
end

No commit comments for this range

Something went wrong with that request. Please try again.