Ruby on Rails
Thursday, June 29, 2017
On Wednesday, June 28, 2017 at 10:09:25 AM UTC-4, Rob Biedenharn wrote:
On 2017-Jun-28, at 01:51 , fugee ohu <fuge...@gmail.com> 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.-RobP.S. The routes could easily be amended to be:resources :comments, except: [:new]I'm looking at the Dustin Fisher example app on github https://github.com/DustinFisher/acts-as- but his comments_controller.rb has no new action Can someone clarify please?commentable-with-threading- example/tree/master/
I put a new action in the comments controller since you don't use a link to new you render the form insteadUnless 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.-Rob
So in your example the forms already on the page in index view instead of a link to new comment? If yes whats wrong with a link to new comment instead of a text area and submit button already rendered?
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0015a57a-7ea0-409e-8f73-7f35afda93a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment