From de855e2420465e66009b9773bc2a928b73153841 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 17 Mar 2014 15:50:16 +0200 Subject: Default value for Snippet#private Signed-off-by: Dmitriy Zaporozhets --- app/models/snippet.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/snippet.rb') diff --git a/app/models/snippet.rb b/app/models/snippet.rb index edc179b20fd..c1c9ba257f2 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -20,6 +20,8 @@ class Snippet < ActiveRecord::Base attr_accessible :title, :content, :file_name, :expires_at, :private + default_value_for :private, true + belongs_to :author, class_name: "User" has_many :notes, as: :noteable, dependent: :destroy -- cgit v1.2.1