#rubyonrails - Thu 17 May 2007 between 00:00 and 00:16

NY Lost Funds



jreynoldsgoetmet: just walk through the result set with an each and keep a counter, checking on each one and starting a new row when counter %4 = 0?
jfarrellhey guys, I have a rails app that was working just fine. I needed to reformat my system - when I reinstalled Rails and moved the application back over, the server starts up right
but i get this really odd error: wrong number of arguments (1 for 0) - which isnt really odd, except that its referencing this line: @settings = Setting.find( :first
Goetmetjreynolds: how do I do that if partials walks through by itself
jfarrellideas anyone?
i dont recall ever hearing about a major change to ActiveRecord
jreynoldsgoetmet: sounds like you need to edit the partial?
tpopejfarrell: what is Setting.superclass?
sixty4bitdelete sucks!
actionsixty4bit OUT!
sixty4bitOUT!
jfarrellim sorry, i disconnected - did anyone post anything relating to my problem?
Im getting a wrong arguments (1 for 0) error on this line of code: @settings = Setting.find( :first )
this code worked fine prior to my reformat and reinstallation of Rails
jreynoldsjfarrell: do other activerecord calls work?
gswainis there a way to have http://url/controller/argument where argument is a post var sent to a default method in the controller ?
im just trying to make shorter links so i dont have to have 3 /'s
so like http://site/users/ben
er user
jfarrelljreynolds, none that i can see
test34_can you limit the eager loading to the first element it finds ?
jfarrellif i comment out that line I get another error, all relating to the find commands I am calling
but with that error in, the application just explodes before it ever gets going
jreynoldsgswain: you should just be able to add the route to your controller as :controller/:argument, :action => 'whatever you want as default'
just make sure that there isn't another route that would conflict what that?
gswainah cool,, so i would do that through routes :) thanks !
jreynoldsyou would definitely do that through routed
routes
jfarrelljreynolds, any ideas - the only thing I can think of at the moment is to rebuild all the controllers/models with my new version of rails - old version was 1.4.1 and the one I installed at 1.8
I just cant think of why this case is occuring and its telling me that find() takes no arguments
Goetmetwhat's wrong in this line inside a partial? <%= Tecnologia.find(:all).each do |t| %>
jreynoldsjfarrell: what happens when you call it with no args?
Goetmeti get this: cript/../config/../app/views/cuenta/_tecnologias_cb.rhtml:3: syntax error, unexpected ')'
_erbout.concat(( Tecnologia.find(:all).each do |t| ).to_s); _erbout.concat "\n"
jreynoldstry leaving out the ( )?
you shouldn't need those anyhow
jfarrelljreynolds, it passes, but gets caught up on another call to find on a different model
tpopeno, leave out the =
the () aren't his
jreynoldsyeah, i meant in the fin(:all)
*find

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive

NY Lost Funds