Skip to content

Commit f107cc6

Browse files
author
Olvap
committedDec 29, 2011
PIMP: Readme
1 parent 2dfec78 commit f107cc6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed
 

‎README.rdoc

+15-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,28 @@ Gemfile
44
gem 'locked', git => 'git@github.com:BlueLemon/Lockable.git'
55

66
Model
7-
acts_as_locked(:foo, :bar)
7+
8+
Model < ActiveRecord::Base
9+
acts_as_locked(:foo, :bar)
10+
end
811

912
Migration
10-
add_column :model, :locked_at, :datetime
13+
class AddLockedToPerson < ActiveRecord::Migration
14+
def change
15+
add_column :model, :locked_at, :datetime
16+
end
17+
end
18+
1119

1220

1321
Example of usage
1422

1523
In the Person model add
16-
acts_as_locked(:name)
24+
class Person < ActiveRecord::Base
25+
# name:string
26+
# age:integer
27+
acts_as_locked(:name)
28+
end
1729

1830
In rails console
1931
p = Person.new

0 commit comments

Comments
 (0)
Please sign in to comment.