Guest User

Untitled

a guest
Sep 20th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. SmartUrlHelper.configure do |url|
  2. url.for ->model{ model.is_a?(Comment) } do |helpers, model|
  3. helpers.post_comment_path(model.post, model)
  4. end
  5.  
  6. # TODO: Add a convenience method for matching on type:
  7. # url.for(Comment) do |helpers, model|
  8. # helpers.post_comment_path(model.post, model)
  9. # end
  10. end
Add Comment
Please, Sign In to add comment