Sha256: c5055a4b0453229464d79b720fc13fc68108f7795d37ecf7c65dab28532cb300

Contents?: true

Size: 332 Bytes

Versions: 11

Compression:

Stored size: 332 Bytes

Contents

module Trestle
  module Controller
    module Title
      extend ActiveSupport::Concern

      included do
        helper_method :default_title
      end

    protected
      def title(title=nil)
        @_title = title if title
      end

      def default_title
        @_title || action_name.titleize
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trestle-0.10.1 app/controllers/concerns/trestle/controller/title.rb
trestle-0.10.0 app/controllers/concerns/trestle/controller/title.rb
trestle-0.10.0.pre2 app/controllers/concerns/trestle/controller/title.rb
trestle-0.10.0.pre app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.8 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.7 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.6 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.5 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.4 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.3 app/controllers/concerns/trestle/controller/title.rb
trestle-0.9.2 lib/trestle/controller/title.rb