KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Rails, what is the difference between attr_accessor and attr_accessible ? From my understanding, using attr_accessor is used to create getter and setter methods for that variable, so that we can access the variable like Object.variable or Object.variable = some_value . I read that attr_accessible makes that specific variable accessible to the outside world. Can someone please tell me whats the difference
Tags (comma-separated)
Save Edits
Cancel