Module: Write::ApplicationHelper
- Included in:
- PostsController
- Defined in:
- app/helpers/write/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#login_user ⇒ Object
7 8 9 |
# File 'app/helpers/write/application_helper.rb', line 7 def login_user defined?(current_user) && current_user end |
#timestamp_display(post) ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/helpers/write/application_helper.rb', line 11 def post words = time_ago_in_words(post.created_at) + " ago" if post.updated? words << " (Updated #{time_ago_in_words(post.updated_at)} ago)" end words end |