Module: Qujo::Concerns::Common::ClassMethods

Defined in:
lib/qujo/concerns/common.rb

Instance Method Summary collapse

Instance Method Details

#errors?Boolean

Returns:

  • (Boolean)


102
103
104
# File 'lib/qujo/concerns/common.rb', line 102

def errors?
  where(status: :error).count > 0
end

#inherited(child) ⇒ Object



106
107
108
109
110
111
112
113
# File 'lib/qujo/concerns/common.rb', line 106

def inherited(child)
  child.instance_eval do
    def model_name
      ::Job.model_name
    end
  end
  super
end