Sha256: 246c5af6e98cc6141d3414ba5c17905a45d4ece11e32e7ef7df4890ca367a5cc
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 KB
Contents
# -*- encoding : utf-8 -*- module RademadeAdmin module Routing module Mapper def admin_resources(*resources, &block) admin_resources = resources.dup options = admin_resources.extract_options!.dup admin_resources.each do |resource| resource_scope(:resources, Resource.new(resource, options)) do yield if block_given? parent_resource_actions = @scope[:scope_level_resource].actions collection do get :autocomplete get :link_autocomplete get :related_index if parent_resource_actions.include? :index patch :re_sort end new do get :form end if parent_resource_actions.include? :new member do get :form if parent_resource_actions.include? :edit post :unlink_relation if parent_resource_actions.include? :update put :link_relation if parent_resource_actions.include? :update end Model::Graph.instance.add_pair(@scope[:controller], self.shallow?) end end resources(*resources, &block) self end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rademade_admin-0.0.3 | lib/rademade_admin/routing/mapper.rb |
rademade_admin-0.0.2 | lib/rademade_admin/routing/mapper.rb |