#rubyonrails - Thu 12 Apr 2007 between 00:00 and 00:18

NY Lost Funds



oomwrtuhi all, if i have a route map.connect ':controller/search/:q', :action => 'search' what should the redirect be if i want to be sure :q is uppercase? i know to test it with if params[:q] != params[:q].upcase
nvm i got it
SlyGuywill scaffold handle foreign key data?
magic_hatSlyGuy: any time you find yourself asking "will scaffold...." the answer is no.
SlyGuyhah
that surprises me
werdnativAnyone know of a helper for getting short excerpts from longer text? (for adding a "more..." link) ...I break mine on string length but I'd like something smarter that at least breaks between words.
BigFischmagic_hat: Since it's going through an ajax call, I'm not sure how to pull the current id. (since the controller is looking for an id) I get a Can't find Picture without an id. Any idea?
magic_hatbasically scaffold does what everyone's seen it do in the rails video. beyond that, it's time to start building your own app.
BigFisch: can you pastie the view? that would help.
BigFischmagic_hat: Sure thing
pastie hi!
pastie: hey!
pastiehttp://pastie.caboo.se/53199 by BigFisch.
SlyGuywell it really wouldn't be that hard to scaffold a drop down list :)
magic_hatlol
BigFisch: form_remote_tag :url => { :action => 'rate', :update => 'rating' , :id=>@picture }
BigFischmagic_hat: thanks a lot :)
Missing template script/../config/../app/views/pictures/rate.rhtml ?
magic_hatBigFisch: do you want anything to happen on the page after the user rates the photo? or just store info in db?
BigFischBigFisch: for now I'd just like to see it work (db) but maybe have it update a 'ratings' div. I don't want the page to redirect or anything, just stay there.
wackimonkiguys, how do i create a sweeper for my ActiveRecordStore sessions?
i can find this info anywhere
magic_hatokay, so any time you do a controller action it tries to render a view with the same name. you need to tell it not to render anything. I'll let you figure that by yourself.
wackimonkican't*
BigFischmagic_hat: Nice ;) - thanks sir.
magic_hatwackimonki: it's in the agile web dev book.
lrojastesting 1 2 3
wackimonkimagic_hat, i'm reading that bit. it is not clear where i can put the 'delete from' command
do i create a sweeper for application_controller? do i 'observe' any models'?
if i observe a model, wouldn't that be slow.
magic_hatwacki: basically you just want to delete sessions that are more than x days old.
wackimonkisure, how do i do that?
magic_hatlol read the activerecord chapters :)
wackimonkigah, ok. i might leave it for now
magic_hatwackimonki: it's not super hard, and it's info you're gonna need to understand well before you get the rest of the app working anyway.
macographerdoes ruby recognize the \w special regexp character?
LoganCapaldomacographer: try and see
wackimonkiyea, i know. i was just being lazy. on to it now
macographerheh.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 

IrcArchive

NY Lost Funds