Module: Rango::UrlHelper

Included in:
Controller
Defined in:
lib/rango/router.rb,
lib/rango/router/adapters/usher.rb,
lib/rango/router/adapters/crudtree.rb,
lib/rango/router/adapters/rack_mount.rb,
lib/rango/router/adapters/http_router.rb

Instance Method Summary collapse

Instance Method Details

#crudtree_generatorObject



18
19
20
# File 'lib/rango/router/adapters/crudtree.rb', line 18

def crudtree_generator
  @@generator ||= CRUDtree::Generator.new(Rango::Router.app.master)
end

#resource(*args) ⇒ Object

resource(@post, :edit), resource(:posts)



14
15
16
# File 'lib/rango/router/adapters/crudtree.rb', line 14

def resource(*args)
  crudtree_generator.generate(*args)
end

#url(*args) ⇒ Object

url(:login)



12
13
14
# File 'lib/rango/router.rb', line 12

def url(*args)
  raise NotImplementedError, "Your router or your router adapter doesn't support this method"
end