Module: Enki::ApplicationHelper
- Included in:
- ApplicationController
- Defined in:
- app/helpers/enki/application_helper.rb
Instance Method Summary collapse
- #author ⇒ Object
- #comments? ⇒ Boolean
- #format_comment_error(error) ⇒ Object
- #paginated(*args) ⇒ Object
- #tags? ⇒ Boolean
Instance Method Details
#author ⇒ Object
4 5 6 |
# File 'app/helpers/enki/application_helper.rb', line 4 def Struct.new(:name, :email).new(Enki.config[:author][:name], Enki.config[:author][:email]) end |
#comments? ⇒ Boolean
16 17 18 |
# File 'app/helpers/enki/application_helper.rb', line 16 def comments? Enki.config.comments? end |
#format_comment_error(error) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/helpers/enki/application_helper.rb', line 8 def format_comment_error(error) { 'body' => 'Please comment', 'author' => 'Please provide your name or OpenID identity URL', 'base' => error.last }[error.first.to_s] end |
#paginated(*args) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'app/helpers/enki/application_helper.rb', line 24 def paginated(*args) if defined? ::Kaminari paginate(*args) elsif defined? ::WillPagniate will_paginate(*args) else nil end end |