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

User super: true to access overriden accessors #62

Merged
merged 5 commits into from Jul 30, 2017
Merged

User super: true to access overriden accessors #62

merged 5 commits into from Jul 30, 2017

Conversation

@shioyama
Copy link
Owner

@shioyama shioyama commented Jul 29, 2017

Mobility::Translates aliases any original setter and getter methods to e.g. title_before_mobility so that they can still be accessed, but this is pretty ugly.

I did two things in this PR:

  • refactored out this pattern in the only place it is used internally (in some Sequel backends) so it's not needed for Mobility itself anymore
  • replaced the _before_mobility alias pattern with a super option, so you can call the original method (if one was defined) with article.title(super: true)
@shioyama shioyama force-pushed the super_option branch 4 times, most recently from f4f7914 to ffb1d50 Jul 29, 2017
@shioyama shioyama force-pushed the super_option branch from fbb8456 to a46e21f Jul 29, 2017
[ci skip]
shioyama added 2 commits Jul 29, 2017
@shioyama shioyama force-pushed the super_option branch from a3658ea to 17ae360 Jul 29, 2017
@shioyama shioyama merged commit 17ae360 into master Jul 30, 2017
3 checks passed
3 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@shioyama shioyama deleted the super_option branch Jul 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.