| Module | ResourceController::Helpers::Urls |
| In: |
../lib/resource_controller/helpers/urls.rb
|
# File ../lib/resource_controller/helpers/urls.rb, line 84
84: def collection_path
85: smart_path *collection_url_options
86: end
# File ../lib/resource_controller/helpers/urls.rb, line 80
80: def collection_url
81: smart_url *collection_url_options
82: end
# File ../lib/resource_controller/helpers/urls.rb, line 92
92: def hash_for_collection_path
93: hash_for_smart_path *collection_url_options
94: end
# File ../lib/resource_controller/helpers/urls.rb, line 88
88: def hash_for_collection_url
89: hash_for_smart_url *collection_url_options
90: end
# File ../lib/resource_controller/helpers/urls.rb, line 76
76: def hash_for_new_object_path
77: hash_for_smart_path *new_object_url_options
78: end
# File ../lib/resource_controller/helpers/urls.rb, line 72
72: def hash_for_new_object_url
73: hash_for_smart_url *new_object_url_options
74: end
Returns all of the current namespaces of the current controller, symbolized, in array form.
# File ../lib/resource_controller/helpers/urls.rb, line 124
124: def namespaces
125: names = self.class.name.split("::")
126: names.pop
127:
128: names.map(&:underscore).map(&:to_sym)
129: end
# File ../lib/resource_controller/helpers/urls.rb, line 68
68: def new_object_path
69: smart_path *new_object_url_options
70: end
# File ../lib/resource_controller/helpers/urls.rb, line 64
64: def new_object_url
65: smart_url *new_object_url_options
66: end
Used internally to provide the options to smart_url from Urligence.
# File ../lib/resource_controller/helpers/urls.rb, line 104
104: def object_url_options(action_prefix = nil, alternate_object = nil)
105: [action_prefix] + namespaces + [parent_url_options, [route_name.to_sym, alternate_object || object]]
106: end