I'm getting an error I can't figure out - can anyone shed light on
this, please?

Using Rails 3.1.0.rc4 and DataMapper 1.1.0

Error I'm getting for index action only:
ActionView::Template::Error (+options[:field]+ entry :id does not map
to a property in Employee)

The error occurs for an index view, but not when showing an individual
record.
(1) Index action:
  @employees = Employee.all  #triggers the error above
(2) Show action:
  @employee = Employee.get(params[:id])  #finds record by id without
error

Employee model:
class Employee
  include DataMapper::Resource
  property :id, Serial
  property :first_name, String, :required => true
  property :last_name, String, :required => true
  property :phone, String
  property :mobile, String
  property :email, String, :required => true
end

NOTE: This error does not occur for the index action of another
similar model in the application - both the index and show actions
work as expected.

-- 
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