activerecord-be_readonly 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,7 +11,7 @@ There are other gems that provide similar behavior, but from what I saw, they di
11
11
 
12
12
  Adding this gem to you bundle will add a class method called be_readonly on each model when Rails loads via a railtie.
13
13
 
14
- If be_readonly is called on the class, it defines the class methods: delete and delete_all and the instance methods: before_create, before_save, before_destroy, and delete to all raise a ActiveRecord::ReadOnlyRecord error. It also defines the instance method readonly? to return true, which disables a lot that tries to create and update in ActiveRecord.
14
+ If be_readonly is called on the class, it defines the class methods: delete and delete_all and the instance methods: before_create, before_save, before_destroy, update_all, and delete to all raise a ActiveRecord::ReadOnlyRecord error. It also defines the instance method readonly? to return true, which disables a lot that tries to create and update in ActiveRecord.
15
15
 
16
16
  ### Setup
17
17
 
@@ -21,6 +21,10 @@ module BeReadonly
21
21
  def delete_all(conditions = nil)
22
22
  raise ActiveRecord::ReadOnlyRecord
23
23
  end
24
+
25
+ def update_all(conditions = nil)
26
+ raise ActiveRecord::ReadOnlyRecord
27
+ end
24
28
  end
25
29
 
26
30
  module BeReadonlyInstanceMethods
@@ -1,3 +1,3 @@
1
1
  module BeReadonly
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-be_readonly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-10 00:00:00.000000000 Z
12
+ date: 2013-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord