Module: ContextExposer::Macros
- Defined in:
- lib/context_exposer/macros.rb
Instance Method Summary collapse
- #context_exposer(name = :base, options = {}) ⇒ Object
- #decorates_before_rendering ⇒ Object (also: #decorates_before_render)
Instance Method Details
#context_exposer(name = :base, options = {}) ⇒ Object
3 4 5 6 7 |
# File 'lib/context_exposer/macros.rb', line 3 def context_exposer name = :base, = {} self.send :include, "ContextExposer::#{name.to_s.camelize}Controller".constantize integrates_with [[:with]].flatten if [:with] end |
#decorates_before_rendering ⇒ Object Also known as: decorates_before_render
9 10 11 12 13 14 |
# File 'lib/context_exposer/macros.rb', line 9 def decorates_before_rendering unless defined? ::DecoratesBeforeRendering raise "DecoratesBeforeRendering not found, please include the gem 'decorates_before_rendering'" end self.send :include, DecoratesBeforeRendering end |