소스 검색

Fix multiple submissions setting

Angus McLeod 7 년 전
부모
커밋
c40bf06953
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 2
      lib/builder.rb
  2. 1 1
      lib/wizard_edits.rb

+ 1 - 2
lib/builder.rb

@@ -35,8 +35,7 @@ class CustomWizard::Builder
   end
 
   def build
-    unless (@wizard.completed? && !@wizard.respond_to?(:multiple_submissions)) ||
-           !@steps
+    unless (@wizard.completed? && !@wizard.multiple_submissions) || !@steps
       @steps.each do |s|
         @wizard.append_step(s['id']) do |step|
           step.title = s['title'] if s['title']

+ 1 - 1
lib/wizard_edits.rb

@@ -71,7 +71,7 @@ end
   end
 
   def include_completed?
-    object.completed? && !object.respond_to?(:multiple_submissions) && !scope.current_user.admin?
+    object.completed? && !object.multiple_submissions && !scope.current_user.admin?
   end
 
   def include_start?