Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated AS:Callbacks docs, variable namings #11195

Merged

Conversation

yangchenyun
Copy link
Contributor

@carlosantoniodasilva
Copy link
Member

Can you squash the last 2 commits at least? The doc commit is fine to be on its own. Thanks.

_ Rename the define_callbacks params to `names`
  - in order to match the naming conventions for `get_callbacks` and `set_callbacks` at https://github.com/rails/rails/blob/master/activesupport/lib/active_support/callbacks.rb#L736-743
  - `define_callbacks` just register names(events), not define the real callback functions.
- Rename the `reset_callbacks` params
@yangchenyun
Copy link
Contributor Author

@carlosantoniodasilva commits squashed. BTW, does git provide shortcuts to squash commits? Currently, I just soft resetting and redo the commits manually.

@zhouguangming
Copy link
Contributor

@carlosantoniodasilva
Copy link
Member

@yangchenyun exactly what @zhouguangming linked: you can use rebase -i to manipulate the history and squash/edit/remove commits. Thanks!

carlosantoniodasilva added a commit that referenced this pull request Jul 1, 2013
…backs

updated AS:Callbacks docs, variable namings
@carlosantoniodasilva carlosantoniodasilva merged commit 18099b0 into rails:master Jul 1, 2013
@yangchenyun
Copy link
Contributor Author

@zhouguangming Thanks 👍

@yangchenyun yangchenyun deleted the update_doc_for_define_callbacks branch July 1, 2013 01:59
gsamokovarov added a commit to gsamokovarov/rails that referenced this pull request Jul 1, 2013
In rails#11195 I noticed a trailing comma in the docs, but I decided to
further clean it up.

What I have done:

* Clean up the trailing comma in the docs and some extra whitespace
  lines.
* Used `Array#extract` options to factor the repetitive pattern of
  `args.last.is_a(Hash) ? ...`
* Renamed the local var `config` to `options` in `define_callbacks`, as
  `options` seems to be the de facto name for the options objects.
* Renamed the local var `l` to `line` in `define_callback` (maybe it
  meant `lambda` in the context) as single `l` may look like `1` in some
  fonts.
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.

None yet

3 participants