- Book-styled UI with parchment aesthetic and Russian navigation - Characters model with Konva.js 2D canvas drawing (draggable shapes) - StoryPages model with character association and page navigation - Stimulus controllers: canvas (editor) + canvas-preview (read-only) - Full Russian interface: all labels, buttons, flash messages in Russian
9 lines
254 B
Ruby
9 lines
254 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Character < ApplicationRecord
|
|
has_many :story_pages, dependent: :nullify
|
|
|
|
validates :name, presence: true, length: { maximum: 100 }
|
|
validates :color, format: { with: /\A#[0-9a-f]{6}\z/i }, allow_blank: true
|
|
end
|