Module: RailsProperties
- Defined in:
- lib/rails-properties.rb,
lib/rails-properties/base.rb,
lib/rails-properties/scopes.rb,
lib/rails-properties/version.rb,
lib/rails-properties/configuration.rb,
lib/rails-properties/property_object.rb,
lib/generators/rails_properties/migration/migration_generator.rb
Defined Under Namespace
Modules: Base, Scopes Classes: Configuration, MigrationGenerator, PropertyObject
Constant Summary collapse
- VERSION =
'3.4.3'
Class Method Summary collapse
-
.can_protect_attributes? ⇒ Boolean
In Rails 3, attributes can be protected by ‘attr_accessible` and `attr_protected` In Rails 4, attributes can be protected by using the gem `protected_attributes` In Rails 5, protecting attributes is obsolete (there are `StrongParameters` only).
Class Method Details
.can_protect_attributes? ⇒ Boolean
In Rails 3, attributes can be protected by ‘attr_accessible` and `attr_protected` In Rails 4, attributes can be protected by using the gem `protected_attributes` In Rails 5, protecting attributes is obsolete (there are `StrongParameters` only)
5 6 7 |
# File 'lib/rails-properties.rb', line 5 def self.can_protect_attributes? (ActiveRecord::VERSION::MAJOR == 3) || defined?(ProtectedAttributes) end |