Sha256: 6409e9450b294589aff73c0f3d4a5998b0e603deebe52ea0ccf78b54e3046c42
Contents?: true
Size: 788 Bytes
Versions: 9
Compression:
Stored size: 788 Bytes
Contents
module Chanko module Controller extend ActiveSupport::Concern module ClassMethods private def inherited(base) if Config.auto_reload && base.name == "ApplicationController" base.class_eval do prepend_before_filter do Chanko::Loader.cache.clear end end end super end def unit_action(unit_name, *function_names, &block) options = function_names.extract_options! block ||= Proc.new { head 400 } Array.wrap(function_names).each do |function_name| define_method(function_name) do invoke(unit_name, function_name, options, &block) end end end alias_method :ext_action, :unit_action end end end
Version data entries
9 entries across 9 versions & 1 rubygems