Sha256: 1d4fcb19f2d8f3dbc01fd4ce9e32e339ecdb4a6abe738e4f7b0a520ed1962016

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

if defined?(ActionController) and defined?(ActionController::Base)
  class ActionController::Base
    include WhowishWord::Constant

    prepend_before_filter :initialize_whowish_word
    helper_method :whowish_word, :whowish_word_active?
    attr_accessor :whowish_word_config

    def initialize_whowish_word
      @whowish_word_config = WhowishWord::Config.new
    end

    def whowish_word
      return @whowish_word_config
    end

    def whowish_word_active?
      @whowish_word_config.edit_mode == true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whowish_word-1.0.0 lib/whowish_word/action_controller/base.rb