Skip to content

Remove enumerize#452

Merged
gmq merged 2 commits into
masterfrom
remove-enumerize
Mar 20, 2023
Merged

Remove enumerize#452
gmq merged 2 commits into
masterfrom
remove-enumerize

Conversation

@gmq

@gmq gmq commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

In Platanus we have transitioned to using the standard Rails enums, which means that we are unable to continue supporting enumerize in this gem.

Comment thread lib/activeadmin_addons/addons/tag_builder.rb Outdated
Comment thread spec/dummy/app/models/invoice.rb Outdated
@gmq gmq force-pushed the remove-enumerize branch from 1a7f5d3 to 3e20a93 Compare March 17, 2023 20:11
@gmq gmq requested review from difernandez and ldlsegovia March 17, 2023 20:17
Base automatically changed from remove-sprockets-support to master March 17, 2023 20:29

@difernandez difernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small things, looks good!

Comment on lines +5 to +8
:enumerize
elsif rails_enum_attr?
@enum_attr = if rails_enum_attr?
:enum
end

raise "you need to pass an enumerize or enum attribute" unless @enum_attr
raise "you need to pass an enum attribute" unless @enum_attr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the change in display_data, @enum_attr is no longer used. We could chage this to just:

raise "you need to pass an enum attribute" unless rails_enum_attr?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole file was for enumerize support, we should just delete it

@gmq gmq force-pushed the remove-enumerize branch from 3e20a93 to 00f2077 Compare March 17, 2023 20:48
@gmq gmq requested a review from difernandez March 17, 2023 20:53
@gmq gmq merged commit 6552c3f into master Mar 20, 2023
@gmq gmq deleted the remove-enumerize branch March 20, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants