Skip to content

Commit

Permalink
Pages::Show#title uses render_or_... helper
Browse files Browse the repository at this point in the history
  • Loading branch information
pcreux committed Jun 5, 2012
1 parent b0dd8fd commit ddc42bb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/active_admin/views/pages/show.rb
Expand Up @@ -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
Expand Down

0 comments on commit ddc42bb

Please sign in to comment.