| dmn | self.field |
| sheldonh | dmn: and now you have it, the full story dmn: nah, ruby doesn't work like that |
| dmn | ahm |
| sheldonh | dmn: for each attribute name (a string), call it field and then... dmn: you can't say action = "fuck" and expect blonde.action(me) to make you happy |
| dmn | ;] |
| sheldonh | i'm playing with an idea for cheap mitigation of cross-site request forgery |
| GMFlash | does it work on burnettes? |
| sheldonh | GMFlash: never try to fuck with mark burnette GMFlash: the guy has crazy lawyers so, basically, my trick... |
| GMFlash | i meant brunette, sorry mark :) |
| sheldonh | you always inspect the http referrer if it's set, is not from this site, and the user is logged in, do not service the request instead, either rlog the user out and proceed, or redirect to the front page or whatever |
| zapnap | hallo |
| sheldonh | that was the quietest 3 minutes of the year on this channel :) |
| argv[] | you've never been here late at night |
| sheldonh | argv[]: that depends on whose night you're talking about |
| zapnap | anyone know why script/server would be overriding the config.logger i set in environment.rb? |
| argv[] | the quiet ones :) |
| sheldonh | haha zapnap: you're setting it in the wrong place or environments/* overrides it? |
| zapnap | good post by topfunky here about installing mods to the logger (hodel 3000 compliant in this case) but it doesn't work with standard script/server for some rason sheldonh: ^^ he mentions it in the article even, but there isn't any explanation :p (i'm doing something similar, or trying to, sigh...) subclassing Logger and setting config.logger it's set inside the initializer block and isn't overriden in environments/* |
| jeezcome_jeezgo | pardon me, I used to use $var++ in PHP to increment tabindex dynamically on my forms. It doesn't seem to work in RoR. Can anyone point me to some clever RoR way of doing this? |
| zapnap | var += 1 :) |
| jeezcome_jeezgo | ok, I thought I tried that as well, but will go make sure now. Thanks! |
| sheldonh | jeezcome_jeezgo: (var += 1) jeezcome_jeezgo: the parens may be important if you're using the result as you would a post increment |
| zapnap | fwiw, it doesn't seem to matter if the server being run is mongrel or webrick. as long as it's been run through script/server it's busted :( |
| sheldonh | jeezcome_jeezgo: oops, i've given you pre increment |
| jeezcome_jeezgo | sheldonh & zapnap: Apparently, I didn't try that before as it now works! thanks |
| zapnap | jeezcome: excellent, np |
| jeezcome_jeezgo | As for pre-increment, I set it to zero when I instantiated it. |
| zapnap | sigh, digging through script/server source... gotta be a reason for this... |