mlins (owner)

Revisions

gist: 199930 Download_button fork
public
Public Clone URL: git://gist.github.com/199930.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
    def completed?
      if subwizard?
        all_instances.all? do |instance|
          instance.decendants.all? do |decendant|
            decendant.completed?
          end
        end
      elsif question?
        model && model.valid?
      else
        decendants(true).all? do |decendant|
          decendant.completed?
        end
      end
    end