Module: Raw::Publishable

Included in:
Controller
Defined in:
lib/raw/controller/publishable.rb

Overview

Include this Mixin to a class to make objects of this class publishable, ie accessible through a standard web (REST) interface.

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(action, *args) ⇒ Object

Use the method_missing hook to compile the actions for this controller.



34
35
36
37
38
39
40
# File 'lib/raw/controller/publishable.rb', line 34

def method_missing(action, *args)
  if Context.current.application.compiler.compile(self.class, action)
    send(action, *args)
  else
    super
  end
end

Class Method Details

.included(base) ⇒ Object



20
21
22
23
24
25
26
27
28
29
# File 'lib/raw/controller/publishable.rb', line 20

def self.included(base)
  super
  base.send(:include, Render)
  base.send(:include, Flashing)
  base.send(:include, Caching)
  base.send(:include, Helpers)
  base.helper(EncodeURI)
  base.helper(CookieHelper)
  base.helper(Markup)
end