#rubyonrails - Tue 10 Apr 2007 between 01:26 and 01:37

lalalalililibut when is when i change the value of using document.formName.fc.value =43, the value 43 is not reflected in my params[:fc]?
aroonisqs: but is it ok to have one method that has differnt types of http methods hitting it? (i already the line you wrote, but with a :foo => :get)
flowandcrashhey guys, i tried to rake a migration that added a :null => false column, with no default value. now, i got an error cause there were existing rows which now obviously didn't have a value for a NOT NULL column. here's the strange thing: postgresql is showing the column as created, but schema.rb isn't showing the column as there
lalalalililibut why when i change the value using document.formName.fc.value =43, the value 43 is not reflected in my params[:fc]?
flowandcrashany idea wtf i can do?
sqsarooni: i believe :foo=>[:get,:post] or :foo=>:all will work (2nd will definitely work, i think 1st will work)
aroonisqs: oooh neato!
sqsarooni: although...if you need to make it GETable and POSTable, it might be best split into two actions.
aroonisqs: even if the contents of the action are mostly the same?
flowandcrashsqs, when you get a sec i'd appreciate any suggestion you could muster
sqsflowandcrash: not sure with pgsql...i'd say run an UPDATE query manually to set default vals for the existing data and rerun the migration (after reverting it)
flowandcrashhow can i revert the migration i just ran?
sqsarooni: what does the action do?
Semyazaanyone here familiar with how Spec::Rails::ContextFactory works?
lalalalililiany idea why my params[:fc] is still nil, even when i change my hidden field using document.formName.fc = 45
Semyazaor how i can set the context in my specs?
sqsflowandcrash: rake db:migrate VERSION=#, where # is the number below the migration you just made (did you include a Migration.down method?) - or just ALTER TABLE (or whatever it is in pgsql)
lalalalilili: don't use document.formName. use $('fc').value = 45;
aroonisqs: it grabs the html of the target website, and adds some html & js code to it... then renders it back to the user
flowandcrashyea i included a down method
sqsarooni: why do you need people to POST to it?
aroonisqs: the reason its GET is because user has already logged in and i know what site they're talking about.... its POST because its on the front page and i need the user to tell me what the url is
lalalalililiwill that work if i make it inside javascript tag?
flowandcrashsqs, i ran the migrate back 1 version and now the column IS showing in my schema.rb
sqslalalalilili: yup
lalalalililithank you i will give that a try
aroonisqs: so waht do you think? two different methods its sounds like to me;; and putting common functionality into a protected method?
sqsarooni: that sounds like the best way to do it to me...since chance are, the two actions will diverge in functionality as you build the app
aroonisqs: yes likely so; they already do slightly different things
mrturtleI was using request.raw_post in an ajaxed method but it doesn't work anymore. I can use the params hash, but I was curious what the other didn't work.
sqsflowandcrash: hmm...no idea what's going on there. i kind of just ignore schema.rb in general.
lalalalililiyes, it work
but my params[:fc] is still nil
sqslalalalilili: put your whole view rhtml in a pastie for us to see
(actually, i gotta leave, now... flowandcrash and arooni, hope those things work out for you guys)
aroonisqs: thanks so much as always

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