Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Product < ApplicationRecord
|
||||
include Auditable
|
||||
|
||||
validates :name, :code, presence: true
|
||||
validates :code, uniqueness: true
|
||||
|
||||
scope :active, -> { where(active: true) }
|
||||
scope :ordered, -> { order(:position, :name) }
|
||||
|
||||
def to_s
|
||||
name
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user