Sha256: b5b241c7b11379d322ce4a06c798f4e4bf0216420e6ab5b6f33ae29ffb1f8917

Contents?: true

Size: 294 Bytes

Versions: 16

Compression:

Stored size: 294 Bytes

Contents

module Main
  class TodosController < Volt::ModelController
    model :page

    def add_todo
      _todos << { name: _new_todo }
      self._new_todo = ''
    end

    def remove_todo(todo)
      _todos.delete(todo)
    end

    def completed
      _todos.count(&:_completed)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
volt-0.9.1 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.1.pre5 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.1.pre4 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.1.pre3 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.1.pre2 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.1.pre1 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre7 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre6 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre5 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre4 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre3 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre2 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.9.0.pre1 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.8.27.beta9 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
volt-0.8.27.beta8 spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb