Sha256: 4769c341c252e2b6f8b4e84e4b599e586d2ca275d0be728acbf626e791faf829
Contents?: true
Size: 677 Bytes
Versions: 1
Compression:
Stored size: 677 Bytes
Contents
#action_controller.rb #require 'railstrap/action_controller' module Railstrap module ActionController #module Base def self.included(base) base.send(:include, InstanceMethods) base.before_filter :tb_namespace #base.after_filter :my_method_2 end module InstanceMethods def tb_namespace path = self.controller_path.split('/') @namespace = path.second ? path.first : nil end end module ClassMethods #def tb_namespace # path = self.controller_path.split('/') # @namespace = path.second ? path.first : nil #end end #end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
railstrap-0.0.1 | lib/railstrap/action_controller.rb |