Statistics | Archive | Index
Search:

Log for #rubyonrails , beginning Saturday, August 09 2008

[00:00:00] <akov_> a lot of the ones im finding are awfully old
[00:00:00] <akov_> can anyone point me to an indepth, beginning rails online book/tutorial for 2.X, im looking at four days on rails right now but its kind of olde
[00:01:00] <icenine457> http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial is a good one
[00:01:00] <tdela> wmoxam: If i do make it roles_url() instead of role_url the error is gone, the url is this: http://localhost:3000/roles?id=1&user_id=2 for the link to "assign" or "remove" a role, when clicked something looks like it happens but the roles don't update.
[00:02:00] <tdela> role_url should be correct, roles_url calls the index action, right?
[00:02:00] <tdela> oh right.
[00:02:00] quit lectrick_home
[00:02:00] <akov_> icenine457, this looks good thanks
[00:02:00] <wmoxam> tdela: the other url looked like it was calling the index action too. Which is where I'm confused ...
[00:02:00] <wmoxam> tdela: roles_url is calling the index action
[00:03:00] <tdela> because: role_url(:id => role.id, :user_id => @user.id), :method => :delete %>
[00:03:00] quit ish__
[00:03:00] <tdela> yea
[00:03:00] <wmoxam> ^^ that should have action => "destroy"
[00:03:00] <icenine457> that and resources. oh man. rest.
[00:03:00] <icenine457> the biggest change from 1.2 to 2 (from what i saw) thatll throw you off is the scaffolding
[00:03:00] <wmoxam> {"_method"=>"delete", "action"=>"index", "id"=>"1", "controller"=>"roles", "user_id"=>"2"}
[00:04:00] <wmoxam> no
[00:04:00] <wmoxam> actually
[00:04:00] <wmoxam> icenine457: maybe
[00:04:00] join ish__
[00:04:00] <tdela> delete is the method, the inspect shows fine, except the action being called.
[00:04:00] <icenine457> wmoxam: it looks like i might want a presenter?
[00:05:00] <wmoxam> tdela: move map.resources :roles
[00:05:00] <tdela> me neither heh. I thought I was going crazy.
[00:05:00] <wmoxam> tdela: I dunno what's going on
[00:05:00] <icenine457> my brains already soggy as it is.
[00:06:00] <zipnine> tdela: are you using any plugins
[00:06:00] <tdela> ok
[00:06:00] join wermse
[00:06:00] <wmoxam> tdela: above the :users resources
[00:06:00] <wmoxam> just for fun
[00:07:00] <zipnine> tdela: you have something sticking a param in there
[00:07:00] <zipnine> tdela: the problem isnt in the pastie you sent
[00:07:00] <tdela> none
[00:08:00] <tdela> nor, did it ever :)
[00:08:00] <tdela> hmm, wmoxam i moved it, i did a "assign" and it worked but delete does not now.
[00:08:00] quit wermse
[00:08:00] join digitalhobbit
[00:08:00] <wmoxam> icenine457: so the problem is that timecards aren't showing up?
[00:09:00] <zipnine> tdela: I had a problem where after I clicked on ,say a user, the id parameter persisted onto the next method call. causing something that looked just like that
[00:09:00] <tdela> zipnine: I can't see a param being stuck anywhere in there, there is a problem with the routes I think. The params are fine, we inspected them.
[00:09:00] <wmoxam> icenine457: shouldn't you be looping over the @order.timecards collection in your _timecard partial?
[00:09:00] <icenine457> yeah, theyre in the params, but they arent passed with employee_id's, and it looks like its trying to create a new timecard separate of the one created by the association
[00:09:00] quit path[l]
[00:09:00] join path[l]
[00:10:00] <icenine457> you mean instead of employees?
[00:10:00] <tdela> hold on
[00:10:00] <tdela> on delete.
[00:10:00] <tdela> No action responded to 1
[00:10:00] <tdela> Unknown action
[00:11:00] <tdela> wmoxam: sorry, cancel that, assign doesn't work either, the error i just pasted is the error I get.
[00:11:00] <icenine457> erm no obviously not :P
[00:12:00] <tdela> zipnine: There is no next method call though, the method is a delete or a get which as params.inspect shows is being proper, only it's not calling the right action which tells me something is wrong with my routes (But, i don't know what yet), the id is fine for both role and user. =/
[00:12:00] <icenine457> hm. i get a NoMethodError for billable_hours when i do that.
[00:12:00] quit bts-
[00:14:00] nick
[00:14:00] <zipnine> tdela: and are any of the ids youre working with equal to one ? ...I would try to create the same error with another user or another role and see if the number being stuck in there is in anyway associated with your records.
[00:14:00] quit linoj
[00:14:00] quit Swimming_Bird
[00:14:00] join SBird
[00:15:00] quit Chadk
[00:15:00] join linoj
[00:15:00] <zipnine> tdela: btw, its been a long time eh? msg me
[00:16:00] nick
[00:16:00] join path[l]
[00:16:00] <tdela> is that you glen? :)
[00:16:00] quit wmoxam
[00:16:00] <tdela> ids are not no.
[00:17:00] <icenine457> maybe this instead: does anyone have an example of a rails app with has many through many-to-many associations
[00:18:00] quit path[l]
[00:18:00] <zipnine> lol, you can call me that
[00:20:00] quit saizai
[00:21:00] quit ish__
[00:22:00] join ish__
[00:26:00] join idiocrash
[00:27:00] quit mrbrowne
[00:28:00] join Pacifists
[00:30:00] join NewMonarch
[00:32:00] nick
[00:32:00] join path[l]
[00:35:00] quit ish__
[00:35:00] join morbyte
[00:37:00] join akt
[00:37:00] <markyt> (I've grepped the source)
[00:37:00] <markyt> I can't find where it actually closes a connection
[00:37:00] <markyt> close method is?
[00:37:00] <markyt> 's
[00:37:00] <markyt> does anyone know where activerecord
[00:38:00] quit MegadethGuy
[00:38:00] quit sebas-
[00:40:00] quit jolts
[00:41:00] join path7
[00:42:00] quit collink
[00:42:00] quit catdude
[00:45:00] quit akov_
[00:45:00] quit Aut0zz
[00:45:00] quit cleverstart
[00:46:00] quit nice_burger
[00:47:00] <idiocrash> God, that probably makes no sense at all
[00:47:00] <idiocrash> Can anyone tell me why this controller seems to be ignoring the part where it checks to see if there's an existing record? It keeps trying to save the record even if it already exists, which raises a validation error, breaking the logical flow: http://pastie.org/250397
[00:49:00] <icenine457> http://dev.rubyonrails.org/ticket/6461 has anyone used this?
[00:50:00] <slabs> anyone in here want to make some quick money tonight? I need an alexa xml response converted into a hash (or parts of it anyways)
[00:50:00] join slabs
[00:50:00] quit morbyte-zZ
[00:54:00] quit obx
[00:55:00] join obx
[00:55:00] quit aquabu
[00:57:00] <Antiarc> I'm having an issue with gem loading from cron jobs.
[00:57:00] <idiocrash> I'm so mad I could pee real hard.
[00:58:00] quit mrelusive|eswat
[00:58:00] <Antiarc> Loading a gem fails from redcloth, where it works in the app and from script/console
[00:58:00] quit Ragged42Jack
[00:59:00] <Antiarc> http://pastey.net/93377 explains it a bit better.
[01:00:00] quit path[l]
[01:03:00] join MyTallest
[01:05:00] join RaggedJack
[01:06:00] <markyt> anyone know how to invoke rspec with the verbose flag on?
[01:06:00] quit linoj
[01:07:00] join jay-man
[01:07:00] join fhobia
[01:08:00] quit jay-man_
[01:08:00] join jay-man_
[01:09:00] join jay-man_
[01:10:00] join jay-man
[01:10:00] quit jay-man
[01:12:00] quit logankoester
[01:12:00] join blackbelt080
[01:13:00] quit olauzon
[01:13:00] join logankoester
[01:14:00] nick
[01:16:00] quit fhobia
[01:17:00] <jtoy> how can I have one named_scope call another named_scope?
[01:18:00] join nice_burger
[01:19:00] <jtoy> named_scope seems to be really basic in its current form
[01:19:00] <Antiarc> (which sucks)
[01:19:00] <Antiarc> jtoy: As far as I've figured out, you can't chain or nest them
[01:19:00] join nashk
[01:20:00] <nice_burger> cannot chain named scope? thought you could indeed
[01:20:00] quit jtoy
[01:20:00] <Antiarc> It is. It's quite powerful, but has room for improvement.
[01:20:00] join snitko
[01:21:00] <nice_burger> well, they're just text aren't they
[01:21:00] <blackbelt080> http://www.cs.uwaterloo.ca/~mnojoumi/ThesisFiles/FinalSpec/CORBA/24.2.5.html
[01:21:00] <jtoy> ic
[01:21:00] join jtoy
[01:21:00] <Antiarc> You can chain them, but you can't "inherit" one scope from another.
[01:22:00] <jtoy> it cant deal with OR chaining
[01:22:00] <jtoy> multiple joins get clobberred
[01:23:00] quit jcreigh
[01:23:00] <nice_burger> jtoy: example would be nice
[01:24:00] <Antiarc> jtoy: "scope" inherently implies that "OR" isn't possible
[01:24:00] <markyt> ok how about this -- does anyone know how to have rspec print each spec or story as it is tested?
[01:24:00] <jtoy> im sure it will get nicer later
[01:24:00] join draft13
[01:24:00] <jtoy> try a named_scoe that has joins inside, it wont work, i think its fixed in edge, also there is no way to do scopea OR scobeb, its only scopeA and scopeB
[01:24:00] <snitko> hi guys. Simple q: I want to have a helper file in my plugin, should I put it in 'myplugin/app/helpers'? I tried, but my spec didn't autorequire it.
[01:25:00] <jtoy> which doesnt imply and
[01:25:00] <jtoy> well, i liked the named has_finder better anyway
[01:25:00] <jtoy> Antiarc: hmm, right
[01:26:00] join perezd88
[01:26:00] <heythisisdave> can I call capistrano tasks from monit?
[01:26:00] <Antiarc> bah, this cron issue is driving me batty.
[01:26:00] join heythisisdave
[01:28:00] join anathematic
[01:28:00] <icenine457> http://github.com/zilkey/complex_forms_demo_app/tree/master <-GOD
[01:28:00] join callmeed
[01:29:00] <callmeed> anyone use autochronic plugin?
[01:29:00] quit jay-man_
[01:30:00] <icenine457> i got some autochronic once.
[01:32:00] <callmeed> any trick to getting it lit?
[01:32:00] join keisukefukuda
[01:33:00] join jackfruit2117
[01:33:00] join tpiep
[01:34:00] <icenine457> wow late night :/
[01:34:00] <icenine457> i thought you were referring to the plugin.
[01:34:00] <icenine457> oh. wait.
[01:34:00] <icenine457> sry that was a bad joke
[01:35:00] <nofxx> how to you make a native sql call in AR ?
[01:35:00] <callmeed> i unpacked in my plugin dir, doesn't seem to be auto-chronicing for me tho
[01:35:00] join logankoester
[01:35:00] <callmeed> i was :)
[01:35:00] quit logankoester
[01:35:00] quit tpiep
[01:36:00] quit jdarius
[01:36:00] <nofxx> searching google and docs*
[01:36:00] <nofxx> I think i`m searching for the wrong arguments...
[01:37:00] quit nashk
[01:37:00] join moccuo
[01:38:00] <nofxx> callmeed: I need to call a postgis function
[01:38:00] <callmeed> nofxx, what kind of action are you trying to perform?
[01:39:00] <nofxx> just dont know how to write sql in ar
[01:40:00] quit logankoester
[01:40:00] <callmeed> have you looked at georuby?
[01:41:00] join keisukef_
[01:41:00] quit nice_burger
[01:43:00] <nofxx> callmeed: looking again at it... gonna try on func here
[01:43:00] quit akt
[01:43:00] quit rmcafee
[01:48:00] <nofxx> callmeed: no go.. georuby is great.. but postgis has +900 funcs.... anyways, its just a migration.. run once.. forget about it
[01:49:00] join Dong
[01:50:00] <callmeed> gotcha
[01:50:00] quit NewMonarch
[01:53:00] <callmeed> no, sorry
[01:53:00] <nofxx> callmeed: but anyways..... do you have some docs about native calls? It may be useful to bookrmark
[01:53:00] quit Dong
[01:53:00] <nofxx> callmeed: jez... just did it! georuby totally rox
[01:54:00] join logankoester
[01:55:00] join tambra
[01:57:00] join beeew
[01:57:00] quit keisukefukuda
[01:57:00] quit moccuo
[01:58:00] <beeew> hey guys, how do i view again the available routes i have?
[01:59:00] join draft13
[01:59:00] <beeew> (REST)
[02:00:00] join jstad
[02:01:00] <beeew> and..it worked
[02:01:00] <beeew> humm let me try
[02:01:00] <renke2> rake routes?
[02:02:00] <beeew> besides, 'pretend you're DHH" jk
[02:02:00] quit draft13
[02:02:00] <beeew> cause i can help
[02:02:00] <beeew> do u hav any questions on how to get women?
[02:04:00] <jarrettgreen> Anybody here use attachment_fu?
[02:04:00] join jarrettgreen
[02:08:00] join oddalot
[02:08:00] quit etchd
[02:09:00] <oddalot> one more e
[02:09:00] <oddalot> err
[02:09:00] <oddalot> cool thanks beew
[02:09:00] <oddalot> ahhh
[02:09:00] <beeew> @people.size
[02:09:00] join imagetic
[02:09:00] <oddalot> @people.count doesn't work..
[02:09:00] <oddalot> @people
[02:09:00] <oddalot> how do i get a count for an array? for instance
[02:10:00] <beeew> :)
[02:10:00] quit imagetic
[02:10:00] <oddalot> heh
[02:11:00] join kiranH
[02:12:00] <icenine457> ...
[02:12:00] <icenine457> paste:paste
[02:12:00] join moccuo
[02:13:00] <kiranH> Hi.... Can anyone help me in order to know which plugin is good to perform Doc files upload
[02:13:00] join JTMarlin
[02:13:00] <icenine457> i didnt even spell that right
[02:14:00] <jstad> anyone know why cap deploy:setup is creating things with permission of root? I am telling it to 'set :user, "jstad"'
[02:14:00] quit statim
[02:14:00] <icenine457> http://pastie.org/250416 <- what is happening in the collection here
[02:15:00] nick