Sha256: f2099351383fc22acbd07ab014867f46dbe96d4597b0cb3bcc75390919129e14

Contents?: true

Size: 455 Bytes

Versions: 4

Compression:

Stored size: 455 Bytes

Contents

# encoding: utf-8
module ThemesForRails

  module ActionController

    extend ActiveSupport::Concern

    included do

      include ThemesForRails::CommonMethods
      include ThemesForRails::UrlHelpers

    end

    module ClassMethods

      def theme(name, options = {})
        before_filter(options) do |controller|
          controller.set_theme(name)
        end
      end

    end

    def theme(name)
      set_theme(name)
    end

  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
themes_for_rails4-1.5.1 lib/themes_for_rails/action_controller.rb
themes_for_rails-0.5.1 lib/themes_for_rails/action_controller.rb
themes_for_rails-0.5.0 lib/themes_for_rails/action_controller.rb
themes_for_rails-0.5.0.pre lib/themes_for_rails/action_controller.rb