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