| oDesk | RubyPanther: hi :), i can't do this, u = User.find(10) n = User.new(u) how something like this could be done. |
| RubyPanther | you can't it's improper to assign other meaning to the id column |
| lifo | oDesk: try u.clone |
| oDesk | lifo: n = User.new(u.clone) ? |
| lifo | n = u.clone |
| rsl | lifo, in practice is there a diff between x.dup and x.clone? The pickaxe doesn't say it's just an alias but it sounds the same to me. |
| regius | In my magazin the don't edit routes.rb. I added map.connect '', :controller => "account" but it still don't work |
| lifo | rsl: clone is defined in ar.base |
| RubyPanther | it's "usually" the same |
| lifo | rsl: it doesn't populate id rsl: Also, it's a shallow copy |
| rsl | lifo: Aha! So it's different in Rails specifically. Interesting. |
| RubyPanther | .clone is better if it's there because that's the one that the class normally defines |
| rsl | x.dup is a shallow copy as well though. |
| lifo | rsl: Well, then id would be the only diff I'd guess |
| rsl | I haven't used it a lot ['cause of the shallow copying and all] but I've used x.dup [cause it was less letters]. |
| davidw | argh... wtf... this is insane... I have a global variable that I only increment, only set once, and yet it manages to decrement itself |
| RubyPanther | dup is the same column, different AR object, clone is a new unsaved column I meant row not column |
| davidw | time to go for a walk, I guess... |
| orospakr | Hey, I'm noticing that script/runner in a rails app I'm setting up has "#!/usr/bin/env script/runner" set up as the interpreter. However, this causes it to fail with the message: "/usr/bin/env: script/runner: No such file or directory" |
| MrPunkin | What OS is most recommended with dedicated servers and such? I seem to see a lot of Rails guys running on the Centos OS |
| yetAnotherOne | Arch is nice. |
| lifo | MrPunkin: whatever u feel comfortable with |
| Bex_3000 | hey folks, i'm wanting to create a button that when you hover over it a list appears, like a drp down box but without the clicking, any good ways of doing that? |
| orospakr | oops, wait |
| oDesk | lifo: but doing n = u.colne then Profile.new(n) will cause error undefined method "stringify_keys!' |
| lifo | oDesk: You just do n.save and not Profile.new(n) |
| thufir007 | how do I create a table for my model? http://pastey.net/29982 |
| lifo | oDesk: Doing Profile.new(n) is doing something like Profile.new(Profile.new) |
| RubyPanther | orospakr: well normally your rails_root wouldn't be in the system PATH orospakr: so env wouldn't find it |
| Antiarc|Work | I've been considering CentOS, but it just seems...less solid than Fedora to me, ironically :/ |
| orospakr | RubyPanther: it's actually in ferret_start, provided by the acts_as_ferret plugin, not script/runner itself. |
| oDesk | lifo: nice, thanks |
| orospakr | RubyPanther: but yes. |
| oDesk | RubyPanther: thanks too |
| orospakr | this plugin is quite broken, it seems. |