Hello,

Is there something similar to ActiveRecord attr_protected? I want to
protect "belongs_to" attributes from being mass-assigned:

class Comment
 include DataMapper::Resource

 property :id, Serial
 property :body,  Text
 property :created_at,  DateTime
 property :updated_at,  DateTime

 belongs_to :user
end

class User
 include DataMapper::Resource

 property :id, Serial
 property :full_name, String
 property :created_at,  DateTime
 property :updated_at,  DateTime

 has n, :comments
end


So I need DataMapper to ignore params[:comment][:user][:full_name] for
Comment.new(params[:comment]).

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to