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

Use the method for determining attribute methods rather than duplicating #16505

Merged
merged 1 commit into from
Aug 15, 2014

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented Aug 14, 2014

I've been trying to reduce the number of places that care about
attributes, and its existence. We have a method for this check, let's
use it instead.

@sgrif
Copy link
Contributor Author

sgrif commented Aug 14, 2014

/cc @senny

We could also replace the send(attr).nil? with attribute_present?(attr) if we're OK with empty? being called.

@senny
Copy link
Member

senny commented Aug 15, 2014

@sgrif thanks for bringing this up. Looks good to me. I'm 👍 for using attribute_present?. Time does not have an emtpy? method so it should be called anyway.

I've been trying to reduce the number of places that care about
`attributes`, and its existence. We have a method for this check, let's
use it instead.
@sgrif
Copy link
Contributor Author

sgrif commented Aug 15, 2014

@senny Updated.

senny added a commit that referenced this pull request Aug 15, 2014
Use the method for determining attribute methods rather than duplicating
@senny senny merged commit c595a4f into rails:master Aug 15, 2014
@senny
Copy link
Member

senny commented Aug 15, 2014

thank you 💛

senny added a commit that referenced this pull request Aug 15, 2014
@sgrif sgrif deleted the sg-attribute-internals branch March 14, 2018 20:52
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

2 participants