Watched 1 video

Watched 1 Video from start to finish

Subscribed for 1 month

Learning and showing your support for 1 Month

Spread the word 1 time

Referred 1 Member to Drifting Ruby

10

10 times Chatter Box

Make 10 comments to videos or replies to other comments
2/10

10

Share the love 10 times

Liked 10 episodes
1/10

3

Welcome back 3 times

You've visited Drifting Ruby on 3 different days

Suggested 1 episode

Helped the community by suggesting 1 episode

Vote Suggestion 1 time

Helped the community by voting on suggestions 1 time

Share the love 1 time

Liked 1 episode

Earned on 3/4/2019

1 time Chatter Box

Make 1 comment to videos or replies to other comments

Earned on 3/4/2019

selzlein said over 2 years ago on Page Specific Javascript in Ruby on Rails :

Great work, thank you!

I have implemented the controller action specific CoffeeScript approach. Therefore I have 1 .coffee file per controller action. However I stumbled upon an issue... let's say I have a controller with a 'new' action and a respective 'new.coffee' script. When I submit the 'new' page that triggers Rails validation errors, the controller action gets updated to 'create', since it was a Post. Therefore 'new.coffee' won't execute while my controller renders 'new.html.erb' directly, not through a redirect, as is standard Rails scaffold.

In this case what would you recommend? Should I simply use the 1 file per controller approach?

selzlein said over 2 years ago on Page Specific Javascript in Ruby on Rails :

Got it! Thank you :D