How do you designate private or protected attributes in Ruby/Rails?
Are all DB fields automatically attributes, and don't need to be defined in the Model?
Any recommended tutorials?
Working in Rails 3.0.7.
You can use attr_protected
, attr_accessible
or attr_readonly
The attr_protected, attr_readonly and attr_accessible macros control what is accepted for mass-assignment. Read those links if you’re not familiar with the difference between those three macros.
Documentation of ActiveRecord model: