Commit fea9c1a6c1cd3f7173bd001f29b1ed4bc77f7c0b
1 parent
591d6baf
Exists in
master
and in
29 other branches
Copying public/private setting from template
(ActionItem1404)
Showing
3 changed files
with
8 additions
and
1 deletions
Show diff stats
app/models/profile.rb
... | ... | @@ -288,6 +288,7 @@ class Profile < ActiveRecord::Base |
288 | 288 | self.theme = template.theme |
289 | 289 | self.custom_footer = template[:custom_footer] |
290 | 290 | self.custom_header = template[:custom_header] |
291 | + self.public_profile = template.public_profile | |
291 | 292 | |
292 | 293 | # flush |
293 | 294 | self.save_without_validation! | ... | ... |
public/stylesheets/common.css
test/unit/profile_test.rb
... | ... | @@ -1190,6 +1190,13 @@ class ProfileTest < Test::Unit::TestCase |
1190 | 1190 | assert_equal 6, p.boxes_limit |
1191 | 1191 | end |
1192 | 1192 | |
1193 | + should 'copy public/private setting from template' do | |
1194 | + template = fast_create(Profile, :public_profile => false) | |
1195 | + p = fast_create(Profile) | |
1196 | + p.apply_template(template) | |
1197 | + assert_equal false, p.public_profile | |
1198 | + end | |
1199 | + | |
1193 | 1200 | should 'destroy tasks requested to it when destroyed' do |
1194 | 1201 | p = Profile.create!(:name => 'test_profile', :identifier => 'test_profile') |
1195 | 1202 | ... | ... |