comparison app/models/paste.rb @ 433:b445318de858

Inheriting ApplicationRecord
author nanaya <me@myconan.net>
date Fri, 13 May 2016 03:59:50 +0900
parents 68eb23b52864
children f11862e58af4
comparison
equal deleted inserted replaced
432:b6cabed63bc7 433:b445318de858
1 class Paste < ActiveRecord::Base 1 class Paste < ApplicationRecord
2 attr_accessor :is_private 2 attr_accessor :is_private
3 after_initialize :set_privacy, :if => :new_record? 3 after_initialize :set_privacy, :if => :new_record?
4 4
5 before_validation :paste_limit 5 before_validation :paste_limit
6 before_validation :convert_newlines 6 before_validation :convert_newlines