Guest User

Untitled

a guest
Aug 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. module ApplicationHelper
  2. def community_posts_path post
  3. topic = post.topic
  4. forum = topic.forum
  5. return community_forum_topics_post_path(forum, topic, post)
  6. end
  7.  
  8. def community_post_path post
  9. topic = post.topic
  10. forum = topic.forum
  11. return community_forum_topic_post_path(forum, topic, post)
  12. end
  13.  
  14. def edit_community_post_path post
  15. topic = post.topic
  16. forum = topic.forum
  17. return edit_community_forum_topic_post_path(forum, topic, post)
  18. end
  19.  
  20. def new_community_post_path
  21. topic = params[:topic_id]
  22. forum = params[:forum_id]
  23. return new_community_forum_topic_post_path(forum, topic)
  24. end
  25. end
Add Comment
Please, Sign In to add comment