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 :uuid to ActiveRecord's type registry #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add :uuid to ActiveRecord's type registry #42

wants to merge 2 commits into from

Conversation

skalee
Copy link
Contributor

@skalee skalee commented Jan 4, 2019

Register ActiveUUID's attribute types in the type registry, so that users can simply refer these types with an :uuid symbol.

class RegisteredUuidTypeArticle < ActiveRecord::Base
include ActiveUUID::Model

if ENV["DB"] == "postgresql"

Choose a reason for hiding this comment

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

Use the return of the conditional for variable assignment and comparison.

@codecov
Copy link

codecov bot commented Jan 4, 2019

Codecov Report

Merging #42 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   99.02%   99.06%   +0.04%     
==========================================
  Files          18       20       +2     
  Lines         410      428      +18     
==========================================
+ Hits          406      424      +18     
  Misses          4        4
Impacted Files Coverage Δ
spec/integration/registered_type_spec.rb 100% <100%> (ø)
spec/support/models.rb 100% <100%> (ø) ⬆️
spec/support/fabricators.rb 100% <100%> (ø) ⬆️
lib/active_uuid/all.rb 100% <100%> (ø) ⬆️
lib/active_uuid/register_types.rb 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b0ecfd...e5a2449. Read the comment docs.

Test if attribute type can be referenced with :uuid symbol.
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.

2 participants