search for: nathanlb

Displaying 4 results from an estimated 4 matches for "nathanlb".

Did you mean: nathanl
2006 Mar 09
16
Preloading child rows 2 levels deep?
I currently have 3 tables/models: 1) Clients, 2) Charges, and 3) Court_Dates. Clients 1..n Charges 1..n Court_Dates I am trying to find all clients that have a court_date on a certain day: something along the lines of (@client.charge.court_date.date == Date.today). I have had success preloading child rows using the :include parameter, but that only works with a parent and a child, or a
2006 May 26
0
Paginate include => :last and order by value
Why does it seem like I''m having so much trouble with this? I created a topics table, and a replies table. In my Topic model I used the following lines of code: has_many :replies has_one :first_reply, :class_name => ''Reply'', :order => "created_on" has_one :last_reply, :class_name => ''Reply'', :order => "created_on DESC"
2006 Feb 18
2
Question: Table referenced by many tables
Hi my name is Nathan, I am building a website using Ruby on Rails and a MySQL database. The premise is that every news item and piece of article content or a download etc each has it''s own forum. Currently I have it set up so that my News, Content, and Downloads tables each have a discussion_id column. The Discussion table is then referenced by Forums, Forums are referenced by
2006 Feb 22
3
Reading files from dir
I have gif files in my public/images/posticons directory, I want to read their filenames without the extension to list the files as a set of radio buttons in the form: [code]<%= radio_button("thread", "posticon", imgname) %> <img src="/images/posticons/<%= imgname%>.gif" alt="" />[code] Would I be saving myself a lot of time and server