def process_resource_options exp
if exp.nil? and @with_options
exp = @with_options
elsif @with_options
exp = exp.concat @with_options[1..-1]
end
return unless exp.node_type == :hash
hash_iterate(exp) do |option, value|
case option[1]
when :controller, :requirements, :singular, :path_prefix, :as,
:path_names, :shallow, :name_prefix, :member_path, :nested_member_path,
:belongs_to, :conditions, :active_scaffold
when :collection, :member, :new
process_collection value
when :has_one
save_controller = current_controller
process_resource value[1..-1]
self.current_controller = save_controller
when :has_many
save_controller = current_controller
process_resources value[1..-1]
self.current_controller = save_controller
when :only
process_option_only value
when :except
process_option_except value
else
Brakeman.notify "[Notice] Unhandled resource option, please report: #{option}"
end
end
end