- def render(options = {})
- text = options.delete(:text)
- if text
- super options.merge(:plain => text)
- elsif options.delete(:nothing)
- status = options.delete(:status) || :ok
- head status, options
- else
- super options
- end
- end
-
- module ClassMethods
- def included(controller)
- controller.class_eval do
- def self.before_filter(*names, &blk)
- before_action(*names, &blk)
- end
-
- def self.skip_before_filter(*names, &blk)
- skip_before_action(*names, &blk)
- end
- end
-
- super controller
- end