0
@@ -920,12 +920,12 @@ module ActiveRecord #:nodoc:
0
# To start from an all-closed default and enable attributes as needed,
0
# have a look at +attr_accessible+.
0
def attr_protected(*attributes)
0
- write_inheritable_attribute(
"attr_protected", Set.new(attributes.map(&:to_s)) + (protected_attributes || []))
0
+ write_inheritable_attribute(
:attr_protected, Set.new(attributes.map(&:to_s)) + (protected_attributes || []))
0
# Returns an array of all the attributes that have been protected from mass-assignment.
0
def protected_attributes # :nodoc:
0
- read_inheritable_attribute(
"attr_protected")
0
+ read_inheritable_attribute(
:attr_protected)
0
# Specifies a white list of model attributes that can be set via
0
@@ -953,22 +953,22 @@ module ActiveRecord #:nodoc:
0
# customer.credit_rating = "Average"
0
# customer.credit_rating # => "Average"
0
def attr_accessible(*attributes)
0
- write_inheritable_attribute(
"attr_accessible", Set.new(attributes.map(&:to_s)) + (accessible_attributes || []))
0
+ write_inheritable_attribute(
:attr_accessible, Set.new(attributes.map(&:to_s)) + (accessible_attributes || []))
0
# Returns an array of all the attributes that have been made accessible to mass-assignment.
0
def accessible_attributes # :nodoc:
0
- read_inheritable_attribute(
"attr_accessible")
0
+ read_inheritable_attribute(
:attr_accessible)
0
# Attributes listed as readonly can be set for a new record, but will be ignored in database updates afterwards.
0
def attr_readonly(*attributes)
0
- write_inheritable_attribute(
"attr_readonly", Set.new(attributes.map(&:to_s)) + (readonly_attributes || []))
0
+ write_inheritable_attribute(
:attr_readonly, Set.new(attributes.map(&:to_s)) + (readonly_attributes || []))
0
# Returns an array of all the attributes that have been specified as readonly.
0
def readonly_attributes
0
- read_inheritable_attribute(
"attr_readonly")
0
+ read_inheritable_attribute(
:attr_readonly)
0
# If you have an attribute that needs to be saved to the database as an object, and retrieved as the same object,
0
@@ -992,7 +992,7 @@ module ActiveRecord #:nodoc:
0
# Returns a hash of all the attributes that have been specified for serialization as keys and their class restriction as values.
0
def serialized_attributes
0
- read_inheritable_attribute(
"attr_serialized") or write_inheritable_attribute("attr_serialized", {})
0
+ read_inheritable_attribute(
:attr_serialized) or write_inheritable_attribute(:attr_serialized, {})