Skip to content

User super: true to access overriden accessors - #62

Merged
shioyama merged 5 commits into
masterfrom
super_option
Jul 30, 2017
Merged

shioyama merged 5 commits into
masterfrom
super_option

Conversation

@shioyama

@shioyama shioyama commented Jul 29, 2017

Copy link
Copy Markdown
Owner

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
@shioyama
shioyama merged commit 17ae360 into master Jul 30, 2017
@shioyama
shioyama deleted the super_option branch July 30, 2017 13:21
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.

1 participant