diff options
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 3 | ||||
| -rw-r--r-- | app/helpers/link_helper.rb | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 9d52c110..b2603481 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -98,6 +98,9 @@ module ContentHelper | |||
| 98 | # order_by="published_at" | 98 | # order_by="published_at" |
| 99 | # order_direction="DESC" | 99 | # order_direction="DESC" |
| 100 | # ] | 100 | # ] |
| 101 | # | ||
| 102 | # order_by currently takes id, published_at, created_at, updated_at, title | ||
| 103 | # and slug | ||
| 101 | 104 | ||
| 102 | 105 | ||
| 103 | def aggregate? content | 106 | def aggregate? content |
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 2121133e..21e4da59 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -21,8 +21,9 @@ module LinkHelper | |||
| 21 | active = (page_path == path.sub(/^\//, "")) | 21 | active = (page_path == path.sub(/^\//, "")) |
| 22 | end | 22 | end |
| 23 | 23 | ||
| 24 | active_class = active ? {:class => 'active'} : {:class => 'inactive'} | 24 | html_options = html_options.merge( |
| 25 | html_options = html_options.merge(active_class) | 25 | :class => [html_options[:class], active ? "active" : "inactive"].compact.join(" ") |
| 26 | ) | ||
| 26 | locale = (params[:locale] || I18n.locale).to_sym == I18n.default_locale ? nil : (params[:locale] || I18n.locale) | 27 | locale = (params[:locale] || I18n.locale).to_sym == I18n.default_locale ? nil : (params[:locale] || I18n.locale) |
| 27 | 28 | ||
| 28 | link_to( | 29 | link_to( |
