Module: KintoneNotifier

Defined in:
lib/kintone_notifier.rb,
lib/kintone_notifier/bot.rb,
lib/kintone_notifier/version.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Bot

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/kintone_notifier.rb', line 7

def self.included(base)
  base.extend(ClassMethods)
  base.class_eval do
    include KintoneNotifier::InstanceMethods
    if Rails.env.production?
      rescue_from Exception, :with => :render_500
      rescue_from ActiveRecord::RecordNotFound, :with => :render_404
      rescue_from ActionController::RoutingError, :with => :render_404
      rescue_from ActionView::MissingTemplate, :with => :render_404
    end
    helper_method :request_env_string

  end
end