On Sunday, December 1, 2019 at 9:13:53 AM UTC-5, Ariel Juodziukynas wrote:
>
> What's your log level value? make sure it's "debug" on your environment 
> https://guides.rubyonrails.org/debugging_rails_applications.html#log-levels
>
> El dom., 1 dic. 2019 a las 10:30, fugee ohu (<fuge...@gmail.com 
> <javascript:>>) escribió:
>
>>
>>
>> On Saturday, November 30, 2019 at 9:01:50 PM UTC-5, Ariel Juodziukynas 
>> wrote:
>>>
>>> The form looks ok, the parameters on the request too, it's impossible to 
>>> tell you something else if you have nothing on the logs (rails and the 
>>> browser's network tab) that could indicate an error
>>>
>>> El sáb., 30 nov. 2019 a las 22:37, fugee ohu (<fuge...@gmail.com>) 
>>> escribió:
>>>
>>>>  I guess I'd better explain the form I just posted is from the index 
>>>> view and on submit it's supposed to launch the new action and load the 
>>>> next 
>>>> form
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to rubyonra...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/rubyonrails-talk/a4caf763-b02f-4d25-980d-a55310a55fa1%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/rubyonrails-talk/a4caf763-b02f-4d25-980d-a55310a55fa1%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>> It gets a 500 response
>> 127.0.0.1 - - [01/Dec/2019:08:25:49 EST] "GET 
>> /items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=1&commit=New+item 
>> HTTP/1.1" 500 0
>> http://localhost:3000/items -> 
>> /items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=1&commit=New+item
>> How do I find the error?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to rubyonra...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/77108a16-3395-4562-aabd-dbd77d8f80ee%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/rubyonrails-talk/77108a16-3395-4562-aabd-dbd77d8f80ee%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
Now I get 200 response and the log says it rendered items/_form.html.erb 
but the order of operations looks backwards First it renders the form then 
there's the get request to the new action Shouldn't the get request to the 
new action come first?

Started GET 
"/items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=1&commit=New+item" for 
127.0.0.1 at 2019-12-01 09:56:33 -0500
Processing by ItemsController#new as JS
  Parameters: {"utf8"=>"✓", "item"=>{"item_type_id"=>"1"}, "commit"=>"New 
item"}
  ItemProperty Load (0.7ms)  SELECT `item_properties`.* FROM 
`item_properties` WHERE (item_type_id='1')
  Rendering items/new.html.erb within layouts/application
  ItemType Load (0.7ms)  SELECT  `item_types`.* FROM `item_types` WHERE 
`item_types`.`id` = 1 LIMIT 1
  Rendered items/_form.html.erb (9.2ms)
  Rendered items/new.html.erb within layouts/application (13.9ms)
Completed 200 OK in 48ms (Views: 39.8ms | ActiveRecord: 1.4ms)


127.0.0.1 - - [01/Dec/2019:09:56:33 EST] "GET 
/items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=1&commit=New+item 
HTTP/1.1" 200 1749
http://localhost:3000/items -> 
/items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=1&commit=New+item


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/82820e51-ab3b-4e5e-9664-539551449d7b%40googlegroups.com.

Reply via email to