public
Description: FixtureReplacement rails plugin (version 2 and on)
Homepage: http://replacefixtures.rubyforge.org/
Clone URL: git://github.com/smtlaissezfaire/fixturereplacement.git
simplifying by de-factoring

git-svn-id: http://thmadb.com/public_svn/plugins/fixture_replacement2@323 
6dbbdfbd-06da-443d-8068-b1bdd22a71ef
smt (author)
Mon Feb 18 00:13:28 -0800 2008
commit  818296720f203426e419939b129f49797541eb74
tree    8a57d6bd4571efbe119a2070411dc99087255099
parent  672e54265d7fd4cd1f350d71d73aeea1ea021f9f
...
32
33
34
35
 
36
37
 
 
 
 
38
39
40
...
98
99
100
101
102
103
104
105
106
107
108
109
...
32
33
34
 
35
36
 
37
38
39
40
41
42
43
...
101
102
103
 
 
 
 
 
 
104
105
106
0
@@ -32,9 +32,12 @@ module FixtureReplacementController
0
       end
0
     end
0
     
0
- def initialize(fixture_name, h={})
0
+ def initialize(fixture_name, options={})
0
       @fixture_name = fixture_name
0
- assign_from_constructor(h)
0
+ @attributes_proc = options[:attributes] || lambda { Hash.new }
0
+ @from = options[:from]
0
+ @class = options[:class]
0
+
0
       self.class.add_instance(self)
0
     end
0
     
0
@@ -98,12 +101,6 @@ module FixtureReplacementController
0
       @my_fixture ||= find_derived_fixture
0
     end
0
   
0
- def assign_from_constructor(hash_given)
0
- @attributes_proc = hash_given[:attributes] || lambda { Hash.new }
0
- @from = hash_given[:from]
0
- @class = hash_given[:class]
0
- end
0
-
0
     attr_reader :hash_given
0
   
0
     def constantize(symbol)

Comments

    No one has commented yet.