#rubyonrails - Sat 31 Mar 2007 between 10:36 and 11:34

NY Lost Funds



rob5ruby on rails?
NewMonarchah, didn't know about script/destroy
that's completely safe?
mguzmanyeah, it's the reverse of script/generate. you can also run script/destroy -p to see what it'll destroy beforehand
(-p = pretend)
NewMonarchmguzman: awesome. thanks
headhunterhi
how can i provide an non ajax fallback for link_to_remote?
rellik_if I am using find_by_sql(), and I have a statement like "SELECT SUM(...) AS cost ... HAVING cost<20"... how do I access cost on the results.. with the elements returned have #cost?
RurouniJonesHello all, I have a quick question. When I submit a form with an array (build from an instance variable) then the logfile displays "blah" => ["foo","bar"]. But when I pass this in a link I get "blah" => "foo/bar". Rather than handle the parameters differently in the controller I was wondering how you could change the link to match the form submission. I have a feeling it is due to serialize which cannot be done on anything but
wanted to checl.
rellik - tried a = find_by_sql(etc) then a.cost ?
or if it is an array then a[0].cost
mguzmanyea rellik_ , they should have #cost
rellik_RurouniJones, no, am working on it now.. just didn't want to put too much work into it if I was way off
mguzman, thanks
paul0anyone here has experience with SQL Server from Microsoft? I'm trying to migrate one databse from SQL Server to MySQL
Bongo`paul0: http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html
Maybe that will help, im not sure.
paul0Bongo`, thanks!
rellik_is there a way to have two GROUP BYs.. one which affects SUM() and HAVING, and one which doesn't? .. I want to say 'SELECT SUM() AS cost ... GROUP BY cost HAVING cost<20" to get a list of everyone that has made a purchase with items totally less than $20.. but then I Want to find out the total for all the person's purchases under 20
oops wrong channel sorry
Bongo`:(
paul0Bongo`, but i would like to create a script to do this, i'm porting a .NET application to Rails, so if i need a script that does this job now, when i got the Rails app working, i just will need to run the script again
actionbranstrom is away: Busy
branstromis away: Busy
actionbranstrom is back (gone 00:00:51)
branstromis back (gone 00:00:51)
MID-Cloudhow can you tell ActiveRecord that in my table the primary key is 'x' and not 'id' ???
halorgiumMID-Cloud: in the ActiveRecord::Base docs :P
look for 'primary_key' :)
paul0MID-Cloud, http://ar.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html#M000141
halorgiumyou'll have to do some other hacks htough
MID-Cloudthanks
I'll try and look there
adxphey -- this is probably better asked on #ruby, but can anyone tell me the difference between Bar.foo and self.foo in class Bar?
paul0it's just another way to call it, i think.. i don't see any reason to get different behavior between them
matledadxp: with def self.foo you can change the classname without changing all the defs
halorgiumcalling self within the class definition returns the class instance
so it is the same
adxpok, cool, thanks.
valehruI am having difficulties trying to get an image to display in my rails app through css. I have this in the css file however the image seems to never display...

Page: 3 10 17 24 31 38 45 52 59 66 73 80 

IrcArchive

NY Lost Funds