| lalalalilili | but when is when i change the value of using document.formName.fc.value =43, the value 43 is not reflected in my params[:fc]? |
| arooni | sqs: 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) |
| flowandcrash | hey 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 |
| lalalalilili | but why when i change the value using document.formName.fc.value =43, the value 43 is not reflected in my params[:fc]? |
| flowandcrash | any idea wtf i can do? |
| sqs | arooni: i believe :foo=>[:get,:post] or :foo=>:all will work (2nd will definitely work, i think 1st will work) |
| arooni | sqs: oooh neato! |
| sqs | arooni: although...if you need to make it GETable and POSTable, it might be best split into two actions. |
| arooni | sqs: even if the contents of the action are mostly the same? |
| flowandcrash | sqs, when you get a sec i'd appreciate any suggestion you could muster |
| sqs | flowandcrash: 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) |
| flowandcrash | how can i revert the migration i just ran? |
| sqs | arooni: what does the action do? |
| Semyaza | anyone here familiar with how Spec::Rails::ContextFactory works? |
| lalalalilili | any idea why my params[:fc] is still nil, even when i change my hidden field using document.formName.fc = 45 |
| Semyaza | or how i can set the context in my specs? |
| sqs | flowandcrash: 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; |
| arooni | sqs: it grabs the html of the target website, and adds some html & js code to it... then renders it back to the user |
| flowandcrash | yea i included a down method |
| sqs | arooni: why do you need people to POST to it? |
| flowandcrash | wtf |
| arooni | sqs: 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 |
| lalalalilili | will that work if i make it inside javascript tag? |
| flowandcrash | sqs, i ran the migrate back 1 version and now the column IS showing in my schema.rb |
| sqs | lalalalilili: yup |
| flowandcrash | WTF |
| lalalalilili | thank you i will give that a try |
| arooni | sqs: so waht do you think? two different methods its sounds like to me;; and putting common functionality into a protected method? |
| sqs | arooni: 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 |
| arooni | sqs: yes likely so; they already do slightly different things |
| mrturtle | I 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. |
| sqs | flowandcrash: hmm...no idea what's going on there. i kind of just ignore schema.rb in general. |
| flowandcrash | ah |
| lalalalilili | yes, it work but my params[:fc] is still nil |
| sqs | lalalalilili: 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) |
| arooni | sqs: thanks so much as always ! |