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

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 Compare July 29, 2017 12:51
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

1 participant