can someone help, please, how to work with Active Record?
I’m trying under this page
- building query on database, but I’m getting errors always, when I try
to use some command except .new, .save, .find, .all.
in application.rb I have:
in my model I have:
class Example < ActiveRecord::Base
And now if I try:
exam= Example.order(“name_at ASC”) #–> undefined method `spec’ for
nil:NilClass (that is in a view)
exam= Example.all #–> works
I guess everything for work with AR is ready, but I don’t now, why
commands as .order, .where, .first etc not works…
I’m using Rails 3.0.5 and MongoDB.