| jreynolds | goetmet: 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? |
| jfarrell | hey 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 |
| Goetmet | jreynolds: how do I do that if partials walks through by itself |
| jfarrell | ideas anyone? i dont recall ever hearing about a major change to ActiveRecord |
| jreynolds | goetmet: sounds like you need to edit the partial? |
| tpope | jfarrell: what is Setting.superclass? |
| sixty4bit | delete sucks! |
| action | sixty4bit OUT! |
| sixty4bit | OUT! |
| jfarrell | im 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 |
| jreynolds | jfarrell: do other activerecord calls work? |
| gswain | is 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 |
| jfarrell | jreynolds, none that i can see |
| test34_ | can you limit the eager loading to the first element it finds ? |
| jfarrell | if 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 |
| jreynolds | gswain: 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? |
| gswain | ah cool,, so i would do that through routes :) thanks ! |
| jreynolds | you would definitely do that through routed routes |
| jfarrell | jreynolds, 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 |
| Goetmet | what's wrong in this line inside a partial? <%= Tecnologia.find(:all).each do |t| %> |
| jreynolds | jfarrell: what happens when you call it with no args? |
| Goetmet | i 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" |
| jreynolds | try leaving out the ( )? you shouldn't need those anyhow |
| jfarrell | jreynolds, it passes, but gets caught up on another call to find on a different model |
| tpope | no, leave out the = the () aren't his |
| jreynolds | yeah, i meant in the fin(:all) *find |