#rubyonrails - Sun 4 Mar 2007 between 16:55 and 17:13



dmnself.field
sheldonhdmn: and now you have it, the full story
dmn: nah, ruby doesn't work like that
dmnahm
sheldonhdmn: 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;]
sheldonhi'm playing with an idea for cheap mitigation of cross-site request forgery
GMFlashdoes it work on burnettes?
sheldonhGMFlash: never try to fuck with mark burnette
GMFlash: the guy has crazy lawyers
so, basically, my trick...
GMFlashi meant brunette, sorry mark :)
sheldonhyou 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
zapnaphallo
sheldonhthat was the quietest 3 minutes of the year on this channel :)
argv[]you've never been here late at night
sheldonhargv[]: that depends on whose night you're talking about
zapnapanyone know why script/server would be overriding the config.logger i set in environment.rb?
argv[]the quiet ones :)
sheldonhhaha
zapnap: you're setting it in the wrong place or environments/* overrides it?
zapnapgood 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_jeezgopardon 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?
zapnapvar += 1 :)
jeezcome_jeezgook, I thought I tried that as well, but will go make sure now. Thanks!
sheldonhjeezcome_jeezgo: (var += 1)
jeezcome_jeezgo: the parens may be important if you're using the result as you would a post increment
zapnapfwiw, 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 :(
sheldonhjeezcome_jeezgo: oops, i've given you pre increment
jeezcome_jeezgosheldonh & zapnap: Apparently, I didn't try that before as it now works! thanks
zapnapjeezcome: excellent, np
jeezcome_jeezgoAs for pre-increment, I set it to zero when I instantiated it.
zapnapsigh, digging through script/server source... gotta be a reason for this...

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101 108 

IrcArchive