Ruby on Rails Wednesday, June 28, 2017

On 2017-Jun-28, at 01:51 , fugee ohu <> wrote:

On Monday, June 26, 2017 at 9:43:19 AM UTC-4, Rob Biedenharn wrote:
At this point, you should be able to look around a small codebase like this and figure it out, but here are the "hints":

If you don't get how this is working, point to a specific thing and ask a more directed question.


P.S. The routes could easily be amended to be:
resources :comments, except: [:new]

On 2017-Jun-25, at 22:04 , fugee ohu <> wrote:

I'm looking at the Dustin Fisher example app on github but his comments_controller.rb has no new action Can someone clarify please?

I put a new action in the comments controller since you don't use a link to new you render the form instead

Unless you're changing other parts, too. You will NEVER hit the :new action because you ALWAYS create the comment form in the context of a Post or another Comment. Like I said, you could add `, except: [:new]` to the route if it bothers you.

No comments:

Post a Comment