#rubyonrails - Sun 11 Mar 2007 between 00:00 and 00:04

NY Lost Funds



freeb0rnwait no that's awful
GaryKingfreeb0rn: doesn't make the :id dynamic though
freeb0rnwell
:id => your_id_variable
whatever it might be
bitsweatdon't submit to a dynamic url
make the id a form param instead
p34rhow do you shush it if it cant find Message.find(params[:id])?
GaryKingfreeb0rn: Is that for form_tag()?
p34rits displaying an error and i just want to continue to view
freeb0rnim nots ure why you're submitting to a dynamic URL in the first place
bitsweatp34r: use Message.find_by_id and it'll return nil if not found
freeb0rnbitsweat aha, yeah, but how do I make it do that?
Skizonchange="$('myform').action = '/blah/show/' + this.value;"
p34rbitsweat: ah cool, thanks
GaryKingfreeb0rn: change dropdown value, then redirect to /show/id
Skiz: oh snap, js magic
freeb0rnyeah that's better
bitsweatfreeb0rn: pick a specific occurrence to use
SkizGaryKing, well thats the only way to change the action attribute on a form
CademiaXvalidates_confirmation_of :password, validates_presence_of :password
Skizdynamically that is
CademiaXdoes that work the same way as the email confirm?
freeb0rndoes creating a new event not create a new occurence as well?
bitsweatdon't solve the problem Skiz!! eliminate it ;)
SkizI've done it once or twive, its not nice but it works
bitsweat, good idea, just answering the Q not fixing it ;)
GaryKingShould I go with freeb0rn 's soln?
freeb0rnmine might not even work now that I think about it
Skizevent, occurrences. oh my. flashback
freeb0rnI guess it could
CademiaXvalidates_confirmation_of :password, validates_presence_of :password
does that work the same way as the email confirm?
Skizits funny to see xp installer running on my mbp
bitsweatpretty much, CademiaX
try it
test it
SkizCademiaX, yup there is a dynamic attribue now. password_confirmation
freeb0rnbitsweat when I do Event.new is there no new occurrence created even though the event has_many occurrences?
GaryKing<select id="id_title" name="id[title]" onchange="this.form.submit();"><option value="">SELECT ONE</option> is generated from <%= collection_select :id, :title, @client_types, :id, :title, { :prompt => 'SELECT ONE' }, { :onchange => 'this.form.submit();' } %>

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

IrcArchive

NY Lost Funds