Browse files

Pages::Show#title uses render_or_... helper

  • Loading branch information...
1 parent b0dd8fd commit ddc42bb6964bf054429eb8fd22196e6f7211968d @pcreux pcreux committed Jun 5, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/active_admin/views/pages/show.rb
View
7 lib/active_admin/views/pages/show.rb
@@ -8,11 +8,8 @@ def config
end
def title
- case config[:title]
- when Symbol, Proc
- call_method_or_proc_on(resource, config[:title])
- when String
- config[:title]
+ if config[:title]
+ render_or_call_method_or_proc_on(resource, config[:title])
else
default_title
end

0 comments on commit ddc42bb

Please sign in to comment.