Revert #15502, and add a deprecation warning instead. #15878

Merged
merged 1 commit into from Jun 23, 2014

Conversation

Projects
None yet
3 participants
@sgrif
Member

sgrif commented Jun 23, 2014

This is public API, and simple_form depends on the nil return value.
We need to go through a deprecation cycle to return a null object. If
people want hash access, they can access the hash.

Closes #15877

Add a deprecation cycle for `NullColumn` from `column_for_attribute`
This is public API, and `simple_form` depends on the `nil` return value.
We need to go through a deprecation cycle to return a null object. If
people want hash access, they can access the hash.

rafaelfranca added a commit that referenced this pull request Jun 23, 2014

Merge pull request #15878 from sgrif/sg-null-column
Revert #15502, and add a deprecation warning instead.

@rafaelfranca rafaelfranca merged commit 679626e into rails:master Jun 23, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@@ -104,11 +104,11 @@ def key_conversion_required?
end
def association_key_type
- @klass.column_for_attribute(association_key_name).type
+ @klass.type_for_attribute(association_key_name.to_s).type

This comment has been minimized.

@egilburg

egilburg Jun 23, 2014

Contributor

could .to_s be normalized inside the type_for_attribute method?

@egilburg

egilburg Jun 23, 2014

Contributor

could .to_s be normalized inside the type_for_attribute method?

This comment has been minimized.

@sgrif

sgrif Jun 23, 2014

Member

We've been pushing to consistently use strings internally, rather than allowing both everywhere.

@sgrif

sgrif Jun 23, 2014

Member

We've been pushing to consistently use strings internally, rather than allowing both everywhere.

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Jun 23, 2014

Member

Weird. Simple Form build should had fail on master 😢

Member

rafaelfranca commented Jun 23, 2014

Weird. Simple Form build should had fail on master 😢

@sgrif

This comment has been minimized.

Show comment
Hide comment
@sgrif

sgrif Jun 23, 2014

Member

I didn't actually confirm the report, but the fact that it came up at all made it clear someone somewhere is relying on this behavior.

Member

sgrif commented Jun 23, 2014

I didn't actually confirm the report, but the fact that it came up at all made it clear someone somewhere is relying on this behavior.

@sgrif sgrif deleted the sgrif:sg-null-column branch Jun 23, 2014

@seanlinsley seanlinsley referenced this pull request in activeadmin/activeadmin Oct 14, 2014

Merged

remove rails 4.2 deprecated method column_for_attribute #3487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment