File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,12 +13,7 @@ def create
1313 @template = Template . find ( params [ :template_id ] )
1414 authorize ( @template , :customize? )
1515
16- puts "AUTH CHECK COMPLETE"
17-
1816 if @template . customize? ( current_user . org )
19-
20- puts "PASSED"
21-
2217 begin
2318 @customisation = @template . customize! ( current_user . org )
2419 redirect_to org_admin_template_path ( @customisation )
@@ -27,9 +22,6 @@ def create
2722 flash . now [ :alert ] = _ ( 'Unable to customize that template.' )
2823 end
2924 else
30-
31- puts "FAILED"
32-
3325 flash . now [ :notice ] = _ ( 'That template is not customizable.' )
3426 end
3527 redirect_back ( fallback_location : org_admin_templates_path )
Original file line number Diff line number Diff line change @@ -418,13 +418,7 @@ def generate_version?
418418 # Determines whether or not a customization for the customizing_org passed
419419 # should be generated
420420 def customize? ( customizing_org )
421-
422- puts "Is an Org? #{ customizing_org . is_a? ( Org ) } AND (Is a funder? #{ org . funder? } OR is default? #{ is_default } )"
423-
424421 if customizing_org . is_a? ( Org ) && ( org . funder? || is_default )
425-
426- puts "Found existing customization? #{ !Template . unarchived . exists? ( customization_of : family_id , org : customizing_org ) } "
427-
428422 return !Template . unarchived . exists? ( customization_of : family_id ,
429423 org : customizing_org )
430424 end
@@ -491,7 +485,7 @@ def customize!(customizing_org)
491485 raise ArgumentError , _ ( 'customize! requires an organisation target' ) unless customizing_org . is_a? ( Org )
492486
493487 # Assume self has org associated
494- raise ArgumentError , _ ( 'customize! requires a template from a funder' ) if !org . funder_only ? && !is_default
488+ raise ArgumentError , _ ( 'customize! requires a template from a funder' ) if !org . funder ? && !is_default
495489
496490 args = {
497491 attributes : {
You can’t perform that action at this time.
0 commit comments