Sha256: 93cd477ce625f3673218f149ac1a97abae3e95af594f010c2464b0080f4b6155

Contents?: true

Size: 214 Bytes

Versions: 5

Compression:

Stored size: 214 Bytes

Contents

class Todo < ActiveRecord::Base
  scope :completed, -> { where("completed = ?", true) }
  scope :active, -> { where("completed = ?", false) }

  def title=(title)
    write_attribute(:title, title.strip)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
half-pipe-0.3.0.beta.2 examples/todomvc-rails/app/models/todo.rb
half-pipe-0.3.0.beta.1 examples/todomvc-rails/app/models/todo.rb
half-pipe-0.3.0.alpha.5 examples/todomvc-rails/app/models/todo.rb
half-pipe-0.3.0.alpha.4 examples/todomvc-rails/app/models/todo.rb
half-pipe-0.3.0.alpha.3 examples/todomvc-rails/app/models/todo.rb