I'm finding myself stuggling more and more often trying to figure out
how to develop custom database queries from within a controller. I've
found lots of resources, one of which being
http://guides.rubyonrails.org/active_record_querying.html but nothing
i've found is hobo specific. Is there a hobo way to do this sort of
thing? I feel like what I've been dealing with is a hodgepodge of
techniques.

In short, is there a clear reference anywhere on all available
activerecord queries I can use in a hobo controller?


This is about the limit to what I can do.

@myOrder = Order.find :first, :limit => 1, :conditions => {:user_id =>
current_user}

As far as I understand, what the above line does is as follows:

find, among the models called orders, any models where the userId is
the same as the current user (condition), starting with the first one
found(:first), and only return 1 instance(:limit => 1).

If anyone has a good reference as to all the commands I can use in a
query like this, I would be much appreciative. If not, I'd like to
start a conversation to confer about the different kinds of things you
can and can't do with activerecord queries like above.


-HoboHippy

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to