app/controllers/admin/cms_controller.rb
def generate_titles( action = nil, content = nil )

      action  = ( action.nil? ? action_name : action.to_s )
      content ||= @content unless @content.nil? || ( action === 'index' )

      # if we’re in something that has an additional segment, show that
      unless content.nil? or action == 'new'

        @breadcrumb << {
          title: breadcrumb_t( @model_class, :show, { title: content.to_s } ),
          url:   ( path_for( content, :show ) rescue nil )
        }

      end

      # put the current location on the breadcrumb, + generate the title
      @breadcrumb << breadcrumb_t( @model_class, action, { title: content.to_s }) unless ( action == 'index' )
      @page_title  = title_t( @model_class, action, { title: content.to_s })

    end
# Generates the page title + breadcrumb for the current page + action.
Generates the page title + breadcrumb for the current page + action.
Generates the page title + breadcrumb for the current page + action .
def generate_titles( action = nil, content = nil )
      action  = ( action.nil? ? action_name : action.to_s )
      content ||= @content unless @content.nil? || ( action === 'index' )
      unless content.nil? or action == 'new'
        @breadcrumb << {
          title: breadcrumb_t( @model_class, :show, { title: content.to_s } ),
          url:   ( path_for( content, :show ) rescue nil )
        }
      end
      @breadcrumb << breadcrumb_t( @model_class, action, { title: content.to_s }) unless ( action == 'index' )
      @page_title  = title_t( @model_class, action, { title: content.to_s })
    end
def generate_titles ( action = nil , content = nil ) action = ( action . nil? ? action_name : action . to_s ) content ||= @content unless @content . nil? || ( action === 'index' ) unless content . nil? or action == 'new' @breadcrumb << { title : breadcrumb_t ( @model_class , :show , { title : content . to_s } ) , url : ( path_for ( content , :show ) rescue nil ) } end @breadcrumb << breadcrumb_t ( @model_class , action , { title : content . to_s } ) unless ( action == 'index' ) @page_title = title_t ( @model_class , action , { title : content . to_s } ) end
Generates the page title + breadcrumb for the current page + action.
Generates the page title + breadcrumb for the current page + action .
# if we’re in something that has an additional segment, show that # put the current location on the breadcrumb, + generate the title
action
content