When I use the attr_accessible to specify which fields from my Model I will expose, is it true for script/console as well? I mean something that I didn't specify as attr_accessible won't be accessible as well through console ?
...
Hi!
I'm using rails3 edge and mongoid 2beta6 with ruby 1.9.2-head.
How can I manually change the table name, just like set_table_name for ActiveRecord? For example my model Signup should use the table "users" for storage, not "signups".
Another question is how to implement the bevahior of attr_accessible AR provides?
Thanks,
Corin
...
Why won't rails reflect attr_accessible in my model?
class User < ActiveRecord::Base
acts_as_authentic
attr_accessible :name, :email, :phone, :password, :password_confirmation
...
When I use formtastic or outprints the model xml, both reveals all the model fields like admin:boolean, password-encrypted:string and so on.
Rails 2...
Is there a way to have rails raise an error if an attempt is made to mass-assign attributes that aren't allowed by attr_accessible?
This would be handy in development to remind me why my shiny new model isn't working, and also good to log in production in order to detect malicious activity.
I'm using rails 2.3.8 but will probably soon ...