jcnetdev-acts_as_applyable 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'acts_as_applyable'
3
- s.version = '0.1'
4
- s.date = '2008-09-16'
3
+ s.version = '0.2'
4
+ s.date = '2008-09-17'
5
5
 
6
6
  s.summary = "A better (and safer) way of applying model attributes from your controller params"
7
7
  s.description = "Rid yourself of attr_accessible and attr_protected. This plugin allows you to stop using mass assignment, and gives you a more flexible way of interacting with your controller params."
@@ -3,14 +3,16 @@ module ActiveRecord
3
3
  module Applyable
4
4
  def self.included(base)
5
5
  base.extend ClassMethods
6
+ base.class_eval do
7
+ include ActiveRecord::Acts::Applyable::InstanceMethods
8
+ cattr_accessor :accessible_attributes
9
+ self.accessible_attributes = []
10
+ end
6
11
  end
7
12
 
8
13
  module ClassMethods
9
14
  def acts_as_applyable(*accessible_attributes)
10
- cattr_accessor :accessible_attributes
11
15
  self.accessible_attributes = accessible_attributes
12
-
13
- include ActiveRecord::Acts::Applyable::InstanceMethods
14
16
  end
15
17
  end
16
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jcnetdev-acts_as_applyable
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: "0.2"
5
5
  platform: ruby
6
6
  authors:
7
7
  - RailsJedi
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-16 00:00:00 -07:00
12
+ date: 2008-09-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency