Module ResourceController::Helpers::Urls
In: ../lib/resource_controller/helpers/urls.rb

Methods

Protected Instance methods

[Source]

    # File ../lib/resource_controller/helpers/urls.rb, line 84
84:         def collection_path
85:           smart_path *collection_url_options
86:         end

[Source]

    # File ../lib/resource_controller/helpers/urls.rb, line 80
80:         def collection_url
81:           smart_url *collection_url_options
82:         end

Used internally to provide the options to smart_url from Urligence.

[Source]

     # File ../lib/resource_controller/helpers/urls.rb, line 98
 98:         def collection_url_options
 99:           namespaces + [parent_url_options, route_name.to_s.pluralize.to_sym]
100:         end

[Source]

    # 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

[Source]

    # 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

[Source]

    # 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

[Source]

    # 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.

[Source]

     # 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

[Source]

    # File ../lib/resource_controller/helpers/urls.rb, line 68
68:         def new_object_path
69:           smart_path *new_object_url_options
70:         end

[Source]

    # 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.

[Source]

     # File ../lib/resource_controller/helpers/urls.rb, line 110
110:         def new_object_url_options
111:           [:new] + namespaces + [parent_url_options, route_name.to_sym]
112:         end

Used internally to provide the options to smart_url from Urligence.

[Source]

     # 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

[Source]

     # File ../lib/resource_controller/helpers/urls.rb, line 114
114:         def parent_url_options
115:           if parent?
116:             parent_singleton? ? parent_type.to_sym : [parent_type.to_sym, parent_object]
117:           else
118:             nil
119:           end
120:         end

[Validate]