[Rails] Re: Routes or .htaccess

2009-07-21 Thread Bill McGuire
e. > # > # Example: > # Alias /myrailsapp /path/to/myrailsapp/public > # RewriteBase /myrailsapp > > I hope that helps! > > Regards, > Gustav Paul > > On Tue, Jul 21, 2009 at 6:56 AM, Bill McGuire < Gustav...thanks for the quick reply. I ended up using the fol

[Rails] Routes or .htaccess

2009-07-20 Thread Bill McGuire
Hello...I use a hosting company that allows me to run multiple ruby apps at the same time. To do that I'm required to do a re-write (.htaccess entry) so that at incoming http requests can be directed to the right app port. http://mysite.com/myrailsapp >> maps to >> http://mysite.com:12007/myrails

[Rails] Re: legacy db connection

2009-06-04 Thread Bill McGuire
Frederick Cheung wrote: > On Jun 4, 12:03�am, Bill McGuire > wrote: >> E. Litwin wrote: >> > Is there any reason you need the underscores in your model names? >> > i.e. Try naming it FreakProject instead of Freak_Project if possible. >> >> > On Jun

[Rails] Re: legacy db connection

2009-06-03 Thread Bill McGuire
E. Litwin wrote: > Is there any reason you need the underscores in your model names? > i.e. Try naming it FreakProject instead of Freak_Project if possible. > > On Jun 1, 11:10�am, Bill McGuire Thanks E and Frederick but no luck. Not really sure what's gone wrong. --

[Rails] Re: legacy db connection

2009-06-01 Thread Bill McGuire
E. Litwin wrote: > Are you getting an error message that you can post? > > On May 29, 2:24�pm, Bill McGuire This is what i get when running via console - thanks ruby script/console Loading development environment (Rails 2.1.2) >> a=Freak_Item.find(:first) => # >> b=F

[Rails] Re: legacy db connection

2009-05-29 Thread Bill McGuire
Siddick Ebramsha wrote: > > Try with :class_name option in has_many method. > > has_many :freak_items, :foreign_key => "projectId", :class_name => > "Freak_Item" Thanks - didn't work though :S -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ Y

[Rails] legacy db connection

2009-05-28 Thread Bill McGuire
Hello All. I need to connect to an older db that doesn't follow the rails naming structure. I can establish a connection ok and read data but am unable to join two tables together within that database. This is what I have: Legacy DB tables: -

[Rails] Re: Filtered display

2008-11-27 Thread Bill McGuire
Jeremy Weiskotten wrote: > Bill McGuire wrote: >> Hello all. I've set up an inventory app and I want to be able to have >> the index file display ether everything in inventory or only items on >> order. So I want to populate @spares with the appropriate content then &g

[Rails] Filtered display

2008-11-26 Thread Bill McGuire
Hello all. I've set up an inventory app and I want to be able to have the index file display ether everything in inventory or only items on order. So I want to populate @spares with the appropriate content then pass it to index.html.erb Is this the right approach? If so how do put logic into the c

[Rails] Re: Iterate through a table record

2008-11-21 Thread Bill McGuire
Harold wrote: > A legs table seems more flexible, however: > > > <% (1..36).each do |p| %> > Leg <%= @race.send(('leg' + p).to_sym) %> > <% end %> > > > On Nov 21, 5:59�pm, Bill McGuire <[EMAIL PROTECTED]> Harold...worked j

[Rails] Re: Iterate through a table record

2008-11-21 Thread Bill McGuire
Lennart Koopmann wrote: > 2008/11/21 Bill Mcguire <[EMAIL PROTECTED]> > >> Is there a way to increment @race.leg so I don't have to write >> @race.leg1 [EMAIL PROTECTED] ? >> > > Can you change the database structure? I think it would make more sense

[Rails] Iterate through a table record

2008-11-21 Thread Bill Mcguire
Hello...I've searched before posting but can't find anything. New and need help. I want to iterate through some fields in my database table and populate a html table with their values. As an example, lets say I have a table (named race) that holds information on a relay race. I have fields leg1,