On 26 May 2010 22:01, anon_comp <[email protected]> wrote:
> On May 26, 4:30 pm, Colin Law <[email protected]> wrote:
>> In what way does it not work?
>
> When I hit the "OK" button nothing happens, it stays on the same page.
>
>> Did you check the html to see if it is what you expect?
>
> I ran the server and looked at the page if that's what you mean, yes.

I meant that you should check that the html for the form is correct
html for a form with a submit button.  I think you may find that there
is a </form> where you do not expect it, (separate from the one you
have manually added).

Looking at your code you have got the use of form_tag wrong.
Unfortunately you have snipped your original code so it is difficult
to insert the corrections.  Have another look at the docs for
form_tag, you will see there should be a 'do' there and  there is no
need to add the </form> yourself.

>
>> I think it should be :action = 'to' rather than :to
>
> It didn't affect anything, I beleive they mean the same thing.

They don't mean the same thing, though sometimes they are
interchangeable.  I am not sure in this case, again check the html to
see if it is correct.

Colin

>
>> Also when things are not working as you expect the log file
>> (log/development.log) can often be useful in analysing the problem.
>
> Thanks for the tip. It processed the index page but nothing registered
> when I hit the OK button.
>
> I really appreciate your replies.
>
> anon_comp

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to