Skip to content

Conversation

@rrrene
Copy link
Contributor

@rrrene rrrene commented Apr 7, 2016

🎨

# Forces REQUEST_METHOD to GET if required.
def call(env)
if matches_server_name?(env) && was_get_request?(env) && !was_xhr_request?(env) && custom_filter?(env)
if matches_server_name?(env) && was_get_request?(env) && !xhr_request?(env) && custom_filter?(env)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about was_get_request?? Should we name it get_request??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe originally_was_get_request? 😉

@rrrene
Copy link
Contributor Author

rrrene commented Apr 7, 2016

Suggestions for the renaming of custom_filter

  • rewrite_as_get_request
  • enforce_get_request
  • custom_get_request

We could also consider "negated" names:

  • keep_post_request
  • keep_original_request_method
  • ignore_request *

* my personal favorite 🎉

/cc @jnbt @Khalasar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants