Sha256: 1224e410cc5b3d08fae4c9a547b417ddf5c905474c086d172bf5c17cf2ada04b
Contents?: true
Size: 715 Bytes
Versions: 1
Compression:
Stored size: 715 Bytes
Contents
module ActionDispatch::Routing class Mapper def governate(*resources) options = resources.extract_options! resources.map!(&:to_sym) resources.each do |resource| mapping = Governor.map(resource, options) resources mapping.resource, :controller => mapping.controller, :governor_mapping => resource do Governor::PluginManager.resources(:child_resources).each_pair do |child_resource, options| options = {:module => :governor}.merge options block = options.delete :block resources(child_resource, options) do instance_eval(&block) if block.present? end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
governor-0.2.0 | lib/governor/rails/routes.rb |