blob: 41cc453b22e13f08db3ac1230af5c5394b71fde5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
class Update < ApplicationRecord
has_many :records, as: :recordable, inverse_of: :recordable
belongs_to :stream
validates :stream, :body, presence: true
accepts_nested_attributes_for :records, allow_destroy: true
def path
"/thinks/#{stream.slug}\#update-#{id}"
end
end
|