changeset 433:b445318de858

Inheriting ApplicationRecord
author nanaya <me@myconan.net>
date Fri, 13 May 2016 03:59:50 +0900
parents b6cabed63bc7
children b2991317d4d7
files app/models/application_record.rb app/models/paste.rb
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/models/application_record.rb	Fri May 13 03:59:50 2016 +0900
@@ -0,0 +1,3 @@
+class ApplicationRecord < ActiveRecord::Base
+  self.abstract_class = true
+end
--- a/app/models/paste.rb	Fri May 13 03:59:39 2016 +0900
+++ b/app/models/paste.rb	Fri May 13 03:59:50 2016 +0900
@@ -1,4 +1,4 @@
-class Paste < ActiveRecord::Base
+class Paste < ApplicationRecord
   attr_accessor :is_private
   after_initialize :set_privacy, :if => :new_record?