Module: Opinio::Controllers::Extensions
- Defined in:
- lib/opinio/controllers/extensions.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/opinio/controllers/extensions.rb', line 5 def self.included(base) base.extend ClassMethods base.send :include, InstanceMethods base.class_eval do (class << self; self; end).instance_eval do define_method "#{Opinio.model_name.underscore}_destroy_conditions" do |&block| Opinio.set_destroy_conditions( &block ) end end end end |