Skip to content

Add :uuid to ActiveRecord's type registry#42

Open
skalee wants to merge 2 commits intomasterfrom
register
Open

Add :uuid to ActiveRecord's type registry#42
skalee wants to merge 2 commits intomasterfrom
register

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.

skalee added 2 commits January 4, 2019 15:08
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

Comments