Tag Archives: getters

Trouble Using Attr_Accessor in Rails Models and Forms

You might use the attr_accessible method to create getters and setters for a class that has attributes which don’t map directly to corresponding fields in a database. For example let’s take the scenario where you are processing a credit card transaction. You don’t want to save the credit card details, such as card number and [...]
Posted in Ruby on Rails | Also tagged , , , , , , | Leave a comment