3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/bento/rails/routes.rb', line 3
def bento_for(*resource_names, &block)
options = resource_names.
resource_names.map!(&:to_sym)
resource_names.each do |resource_name|
Bento::Controllers::Helpers.define_helpers(resource_name)
Bento::Controllers::AccountScopable.define_methods(resource_name)
resource_options = { :controller => account_controller(resource_name) }.merge(options)
resources(resource_name, resource_options) do
collection { get :sign_up }
yield if block_given?
end
end
end
|