My bad,

it looks like the creation form was nested inside of empty <form></form>
tags.  These surrounding tags, must have been what was breaking the
submit action to GET rather than POST.  I removed these tags and it
appears to be working.

Thanks for the help! Sorry about the noise -- Eric

"Eric Schulte" <[EMAIL PROTECTED]> writes:

> Jeff <[EMAIL PROTECTED]> writes:
>
>> On Oct 7, 3:47 pm, "Eric Schulte" <[EMAIL PROTECTED]> wrote:
>>> Is there a way to inspect which method (put, post, get etc...) is being 
>>> sent?
>>>
>>> When I submit this form I am still directed to the
>>> processing_service_controllers/new action.  I'm really not clear on
>>> what's going on, and why this one particular model has issues when all
>>> of my other models are working fine.  Also the
>>> processing_service_levels/edit form is submitting to the edit actions
>>> instead of update.
>>>
>>
>> Are you sure it's just not being redirected?  If the .save fails
>> inside the create() action, it looks like the code will render the new
>> form again - so perhaps it's been misleading?
>>
>> Can you check the development.log, and see if the #create action is
>> really ever getting called?  At the end of the "Processing..." line in
>> the log, you should see "[POST]" to confirm that the POST method is
>> being used.
>>
>
> Thank for the help Jeff,
>
> I checked the logs, and immediately after rendering the
> processing_service_levels/new page, the next line is
>
> Processing ProcessingServiceLevelsController#new (for 127.0.0.1 at 2008-10-07 
> 13:55:32) [GET]
>
> for more of the log see [1] below
>
> which leads me to believe that the form is submitting directly to the
> new action using GET.  I don't see how this could be the case given the
> raw html of the "new" page, unless maybe something is twisted inside of
> the rails routing...
>
> I've also tried sticking error raising code in the from of the udpate
> action, but said code is never reached...
>
> Thanks -- Eric
>
>>
>> Sorry if you've already checked all this... just trying to think of
>> what to try next.
>>
>> Jeff
>> >
> [1]
> ,----[development log]
> | Processing ProcessingServiceLevelsController#new (for 127.0.0.1 at 
> 2008-10-07 13:55:25) [GET]
> |   Session ID: f69ec3fdb850969c52d3e6173df8e72e
> |   Parameters: {"action"=>"new", "version"=>"20", 
> "controller"=>"processing_service_levels"}
> |   User Columns (0.9ms)   SHOW FIELDS FROM `users`
> |   User Load (0.1ms)   SELECT * FROM `users` WHERE (`users`.`id` = 5) LIMIT 1
> |   ProcessingServiceLevel Columns (0.9ms)   SHOW FIELDS FROM 
> `processing_service_levels`
> |   ProcessingServiceVersion Columns (0.8ms)   SHOW FIELDS FROM 
> `processing_service_versions`
> |   ProcessingServiceVersion Load (0.1ms)   SELECT * FROM 
> `processing_service_versions` WHERE (`processing_service_versions`.`id` = 20) 
> |   ProcessingService Columns (0.8ms)   SHOW FIELDS FROM `processing_services`
> |   ProcessingService Load (0.1ms)   SELECT * FROM `processing_services` 
> WHERE (`processing_services`.`id` = 3) 
> | Rendering template within layouts/application
> | Rendering processing_service_levels/new
> | Rendered processing_services/_processing_service (3.7ms)
> | Rendered processing_service_versions/_processing_service_version (3.7ms)
> | Rendered processing_service_levels/_form (4.0ms)
> | Rendered users/_user_bar (3.3ms)
> | Completed in 130ms (View: 35, DB: 4) | 200 OK 
> [http://localhost/processing_service_levels/new?version=20]
> | 
> | 
> | Processing ProcessingServiceLevelsController#new (for 127.0.0.1 at 
> 2008-10-07 13:55:32) [GET]
> |   Session ID: f69ec3fdb850969c52d3e6173df8e72e
> |   Parameters: {"month"=>"0", "commit"=>"Create", 
> "processing_service_level"=>{"name"=>"Nothing", "description"=>"Nothing", 
> "processing_service_version_id"=>"20"}, "hour"=>"0", 
> "authenticity_token"=>***, "action"=>"new", "day"=>"0", 
> "controller"=>"processing_service_levels"}
> |   User Columns (1.1ms)   SHOW FIELDS FROM `users`
> |   User Load (0.1ms)   SELECT * FROM `users` WHERE (`users`.`id` = 5) LIMIT 1
> |   ProcessingServiceLevel Columns (1.1ms)   SHOW FIELDS FROM 
> `processing_service_levels`
> `----

--~--~---------~--~----~------------~-------~--~----~
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