Displaying 1 result from an estimated 1 matches for "my_orders".
2006 Apr 03
3
Retrieving a record using created_by
...alted_hash_login generator. I have an
orders table that has a column named created_by that is updated by the
userstamp plugin. I am trying to retrieve all of the orders for a single
user (the one logged in) and am not sure how to do it. When I use this
code in my order model it works:
def self.my_orders
find(:all,
:conditions => "created_by = 1",
:order => "created_on desc")
end
I want to create dynamic queries and need to use the created_by column
to do it. I appreciate any help you all can give me. Also, in order to
not ask so man...