Module: Nested::Integration::Angular

Defined in:
lib/nested/integration/angular.rb

Defined Under Namespace

Modules: Helper

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(clazz) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/nested/integration/angular.rb', line 4

def self.extended(clazz)
  (class << clazz; self; end).instance_eval do
    attr_accessor :angular_config
  end
  clazz.angular_config = {}

  def clazz.angular(opts={})
    @angular_config.merge!(opts)
  end

  def child_resource(*args, &block)
    Helper::angularize(self, super)
  end
end

Instance Method Details

#child_resource(*args, &block) ⇒ Object



14
15
16
# File 'lib/nested/integration/angular.rb', line 14

def child_resource(*args, &block)
  Helper::angularize(self, super)
end