#rubyonrails - Sun 4 Mar 2007 between 12:58 and 13:08

NY Lost Funds



_davjust change the version column to whatever number accurately reflects the current schema
zachinglisGuys, how do I .gsub only the spaces OUTSIDE of text, such as if I had: ' test '
neveledav_: not sure i completely follow you... getting an error...
matt1982right i managed to find the error log but im not sure if its anything useful really just lots of warnings cant see an error in it anyone else spot anything wrong? http://pastie.caboo.se/44612
jackyyll1then do a revert?
_davif the migrations half-ran, you can end up in a state where you need to start from scratch though.
blow away the db, migrate up, then back down (after you fix whatever broke it last time)
usserhi, is the anyone who uses rails and ferret (with acts_as_ferret)?
jackyyll1a typo broke it :p
nevele_dav: how would that one liner look? im missing a syntax something...
jackyyll1Hmm, changing the schema version to 6 and then reverting to 4 didn't work stilll
_dav@manager.each { |x| x.update_attribute :password, Digest::SHA1.hexdigest("change-me--#{x.password}--") }
nevele_dav: aaah, k.. thanks
jackyyll1Hmm..
SteveDave_can anybody help me with session expiry in rails?
nevele_dav: and would the down method just be blank?
_davjackyyll1: it will only work if the db schema really is at 6. if it is like 4.5 or whatever, you gotta start from scratch or fix it all by hand in your sql client
zachinglisSteveDave_: How about you ask us the question, then we can tell you
nevele_dav: as i really cant go from sha1 back to the string....
usseri've a has_many relationship, and i want to do a join when ferret return the result to do just only 1 query instead of n+1 queries... is it possible ? :(
jackyyll1_dav, how do i start from scratch?
is there a way to just drop the db?
_davnevele: yeah, it's a one way thing
SteveDave_ok - I'm trying to get a "Remember Password' option working on user accounts when they log in, however by default session cookies expire when the browser closes. I can set a long session expiry for all cookies easily, but i only want to set this long expiry for cookies of users who have ticked the 'Remember Password' box.
nevele_dav: cool, hey thanks!
_davjackyyll1: well it depends on your envrionment, are you talking your local dev box? what db server?
jackyyll1mysql
_davnevele: np
jackyyll1and yeah, it's just a dev
i'm doing the "depot" project in the "Agile web development with rails" book
_davyou should write yourself a rake task to drop the db and remigrate, sec, i'll paste one actually
jackyyll1but because i mispelled one thing, it broked my db apparently..
_davoh, yeah definitely save yourself the headache and just hit the shiny reset button
usserSteveDave_: cookies[:remember_me] = {:value => user.remember_token, :expires => user.remember_token_expires} ?
jackyyll1by reset button you mean drop the db? :p
SteveDave_I've tried that usser, but the session_id cookie that rails creates just overwrites the changes i make
_davjackyyll1: yeah. try this: http://pastie.caboo.se/44613
then at the command line, "rake init_dbs"
hope that works, i extracted it from a larger file
jackyyll1you forgot an r ;)

Page: 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 

IrcArchive

NY Lost Funds