Commit de855e2420465e66009b9773bc2a928b73153841
1 parent
cb43d88a
Exists in
spb-stable
and in
3 other branches
Default value for Snippet#private
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
app/models/snippet.rb
... | ... | @@ -20,6 +20,8 @@ class Snippet < ActiveRecord::Base |
20 | 20 | |
21 | 21 | attr_accessible :title, :content, :file_name, :expires_at, :private |
22 | 22 | |
23 | + default_value_for :private, true | |
24 | + | |
23 | 25 | belongs_to :author, class_name: "User" |
24 | 26 | |
25 | 27 | has_many :notes, as: :noteable, dependent: :destroy | ... | ... |