Sha256: df620a9d0d2f1c9445098b5cb5777ef066b21d4bb2d5bc3c5568ecdc1d978479

Contents?: true

Size: 409 Bytes

Versions: 13

Compression:

Stored size: 409 Bytes

Contents

# encoding: UTF-8

module Keynote
  # `Keynote::Controller` is mixed into `ActionController::Base` and
  # `ActionMailer::Base`, providing a `present` method (aliased to `k`) for
  # instantiating presenters.
  module Controller
    # Instantiate a presenter.
    # @see Keynote.present
    def present(*objects, &blk)
      Keynote.present(view_context, *objects, &blk)
    end
    alias k present
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
keynote-1.1.1 lib/keynote/controller.rb
keynote-1.1.0 lib/keynote/controller.rb
keynote-1.0.0 lib/keynote/controller.rb
keynote-0.3.1 lib/keynote/controller.rb
keynote-0.3.0 lib/keynote/controller.rb
keynote-0.2.3 lib/keynote/controller.rb
keynote-0.2.2 lib/keynote/controller.rb
keynote-0.2.1 lib/keynote/controller.rb
keynote-0.2.0 lib/keynote/controller.rb
keynote-0.2.0pre3 lib/keynote/controller.rb
keynote-0.2.0pre2 lib/keynote/controller.rb
keynote-0.2.0pre1 lib/keynote/controller.rb
keynote-0.1.3 lib/keynote/controller.rb