-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
end | ||
|
||
it "returns not_found on wrong method" do | ||
# This spec fails because a get url parameter cannot be named method. | ||
get :index, :version => "2.0", :resource => "architectures", :method => "wrong_method" | ||
|
||
assert_response :not_found | ||
|
@@ -225,6 +226,8 @@ | |
expect(response.body).to eq("apidoc.json cache") | ||
get :index, :version => 'v1', :format => "html", :resource => "resource" | ||
expect(response.body).to eq("resource.html cache") | ||
# get parameters cannot have the name method. Rails was built in such a way that this is a | ||
# reserved keyword. As a result, this get request fails. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
raisin
Author
Owner
|
||
get :index, :version => 'v1', :format => "html", :resource => "resource", :method => "method" | ||
expect(response.body).to eq("method.html cache") | ||
end | ||
|
I added a workaround in (see https://github.com/KjellMorgenstern/apipie-rails/tree/rails-5),
which uses
params: { method: "the_method" }
instead of directly passing :method.I would collect and start a pull request, but this only makes sense when switching to rails 5. Do you know if there are currently any activities to bring apipie to rails 5?