-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make more class attributes inheritable #1255
Conversation
class_attribute :_type, instance_reader: true | ||
class_attribute :_attributes | ||
self._attributes ||= [] | ||
class_attribute :_attributes_keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style-wise, should the assignments be right next to eachother, rather than separated by a class_attribute definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I guess it's my personal preference to group that kind of stuff together. makes it slightly easier to skim, imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ex or pr?
B mobile phone
On Oct 7, 2015, at 6:36 AM, L. Preston Sego III notifications@github.com wrote:
In lib/active_model/serializer.rb:
with_options instance_writer: false, instance_reader: false do |serializer|
class_attribute :_type, instance_reader: true
class_attribute :_attributes
self._attributes ||= []
well, I guess it's my personal preference to group that kind of stuff together. makes it slightly easier to skim, imoclass_attribute :_attributes_keys
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant example code of what you prefer.
B mobile phone
On Oct 8, 2015, at 2:53 PM, L. Preston Sego III notifications@github.com wrote:
In lib/active_model/serializer.rb:
with_options instance_writer: false, instance_reader: false do |serializer|
class_attribute :_type, instance_reader: true
class_attribute :_attributes
self._attributes ||= []
huh?class_attribute :_attributes_keys
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bf4 I think he prefers having all the class_attribute
grouped together, and then the stuff ||= stuff
. I personally do not have an opinion on the matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think i like either but inclined to this. Good to merge?
B mobile phone
On Oct 8, 2015, at 6:25 PM, Lucas Hosseini notifications@github.com wrote:
In lib/active_model/serializer.rb:
with_options instance_writer: false, instance_reader: false do |serializer|
class_attribute :_type, instance_reader: true
class_attribute :_attributes
self._attributes ||= []
@bf4 I think he prefers having all the class_attribute grouped together, and then the stuff ||= stuff. I personally do not have an opinion on the matter.class_attribute :_attributes_keys
—
Reply to this email directly or view it on GitHub.
@rails-api/ams nu? |
LGTM 👍 |
LTGM 👍 On Thu, Oct 8, 2015, 6:37 PM Lucas Hosseini notifications@github.com
|
Make more class attributes inheritable
No description provided.