Commit 2c9dd7ec by cuong.tran

Add a dummy observer and remove annotations

parent c831573f
...@@ -46,3 +46,4 @@ group :development do ...@@ -46,3 +46,4 @@ group :development do
end end
end end
gem 'rails-observers'
...@@ -74,6 +74,8 @@ GEM ...@@ -74,6 +74,8 @@ GEM
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1) railties (= 4.1.1)
sprockets-rails (~> 2.0) sprockets-rails (~> 2.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
railties (4.1.1) railties (4.1.1)
actionpack (= 4.1.1) actionpack (= 4.1.1)
activesupport (= 4.1.1) activesupport (= 4.1.1)
...@@ -125,6 +127,7 @@ DEPENDENCIES ...@@ -125,6 +127,7 @@ DEPENDENCIES
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-rails jquery-rails
rails (= 4.1.1) rails (= 4.1.1)
rails-observers
sass-rails (~> 4.0.3) sass-rails (~> 4.0.3)
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
spring spring
......
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# content :string(255)
# status :integer
# created_at :datetime
# updated_at :datetime
#
class Task < ActiveRecord::Base class Task < ActiveRecord::Base
enum status: %w(normal active completed) enum status: %w(normal active completed)
end end
class TaskObserver < ActiveRecord::Observer
end
\ No newline at end of file
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# content :string(255)
# status :integer
# created_at :datetime
# updated_at :datetime
#
require 'test_helper' require 'test_helper'
class TaskTest < ActiveSupport::TestCase class TaskTest < ActiveSupport::TestCase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment