Ruby on Rails Wednesday, June 14, 2017

Hi. Could you try the code below?

commentable = commentable_type.camelize.constantize.find(commentable_id)


On Tuesday, June 13, 2017 at 11:15:45 PM UTC-3, fugee ohu wrote:
commentable = commentable_type.constantize.find(commentable_id)

NameError in CommentsController#new
wrong constant name post

--
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/81558fa3-4b77-45c2-8b6e-2963d652fd3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment