Runtime assertions for Ruby literal.fun
ruby
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove unnecessary type check from relation type parameter

-8
-8
lib/literal/rails/relation_type.rb
··· 3 3 module Literal::Rails 4 4 class RelationType 5 5 def initialize(model_class) 6 - unless Class === model_class && model_class < ActiveRecord::Base 7 - raise Literal::TypeError.new( 8 - context: Literal::TypeError::Context.new( 9 - expected: ActiveRecord::Base, actual: model_class 10 - ) 11 - ) 12 - end 13 - 14 6 @model_class = model_class 15 7 end 16 8