mayatron / hippie-ipsum

A hippie flavored lorem ipsum generator.
www.hippieipsum.me
MIT License
2 stars 2 forks source link

Logs show multiple posts when clicking a number #1

Closed mayatron closed 11 years ago

mayatron commented 11 years ago

When clicking an number 1-7 the logs show multiple posts being made (two of type JSON, two of type JS). There should only be one post.

Started POST "/" for 127.0.0.1 at 2013-08-21 23:37:24 -0700
Processing by AppController#show as JSON
  Parameters: {"utf8"=>"✓", "commit"=>"3"}
  Rendered app/_ipsum.haml (0.1ms)
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.0ms)

Started POST "/" for 127.0.0.1 at 2013-08-21 23:37:24 -0700
Processing by AppController#show as JSON
  Parameters: {"utf8"=>"✓", "commit"=>"3"}
  Rendered app/_ipsum.haml (0.1ms)
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.0ms)

Started POST "/" for 127.0.0.1 at 2013-08-21 23:37:24 -0700
Processing by AppController#show as JS
  Parameters: {"utf8"=>"✓", "commit"=>"3"}
  Rendered app/_ipsum.haml (0.1ms)
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.0ms)

Started POST "/" for 127.0.0.1 at 2013-08-21 23:37:24 -0700
Processing by AppController#show as JS
  Parameters: {"utf8"=>"✓", "commit"=>"3"}
  Rendered app/_ipsum.haml (0.2ms)
Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.0ms)
mayatron commented 11 years ago

The duplicate posts were happening because there were duplicate JS files both responding. Have cleaned up the compiled assets and set the appropriate flags in development.rb.