class Customer < ActiveRecord::Base attr_accessible :name attr_accessible :name, :credit_rating, :as => :admin
end
To set the credit_rating attribute we must do:
c = Customer.create!({
:name => "Customer",
:credit_rating => 2.5
}, :as => :admin)
How can we define this in Factory?
Thanks.