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

Add option to omit creating an instance reader method on class_attribute #1765

Merged
merged 1 commit into from
Jun 19, 2011
Merged

Add option to omit creating an instance reader method on class_attribute #1765

merged 1 commit into from
Jun 19, 2011

Conversation

bensie
Copy link
Contributor

@bensie bensie commented Jun 18, 2011

In an effort to make class_attribute a little more backward compatible with the now-removed class_inheritable_accessor, I've added the ability to disable the instance reader method.

Here's an example case of where it's needed:
https://gist.github.com/1033533

TL;DR: You can't override the reader method if the module extends ActiveSupport::Concern because of the order that things get mixed-in.

We're struggling to get Carrierwave running on Rails master as we remove uses of class_inheritable_attribute -- if there's any way this can be merged into 3-0-stable and 3-1-stable, that would help a ton. Thanks.

@bensie
Copy link
Contributor Author

bensie commented Jun 19, 2011

Hold off on this for a bit -- should have tested all of Rails instead of just active_support. Currently breaks uses in ActionController.

josevalim added a commit that referenced this pull request Jun 19, 2011
Add option to omit creating an instance reader method on class_attribute
@josevalim josevalim merged commit b1b42b5 into rails:master Jun 19, 2011
@josevalim
Copy link
Contributor

Could you please provide pull requests for 3-0-stable and 3-1-stable?

@bensie
Copy link
Contributor Author

bensie commented Jun 19, 2011

@josevalim Sorry for breaking the build and thanks for fixing. I will open working pull requests for 3-0-stable and 3-1-stable.

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