lockdown 0.5.10 → 0.5.11

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.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.5.11 2008-06-25
2
+ * Update: Classy Inheritance to current version 0.4.4
3
+
1
4
  == 0.5.10 2008-06-24
2
5
  * Modified: Classy Inheritance is now bundled with Lockdown to simplify the user management screens.
3
6
  * Fixed: Templates: Use m.template with views to test for rails version for action_name issue
@@ -39,7 +39,7 @@ module Stonean
39
39
  define_can_be_method_on_requisite_class(model_sym, options[:as])
40
40
  end
41
41
 
42
- options[:attrs].each{|attr| define_accessors(model_sym, attr, options[:prefix])}
42
+ options[:attrs].each{|attr| define_accessors(model_sym, attr, options)}
43
43
  end
44
44
 
45
45
 
@@ -65,7 +65,7 @@ module Stonean
65
65
 
66
66
  def define_relationship(model_sym, options)
67
67
  opts = options.dup
68
- opts.delete(:attrs)
68
+ [:attrs, :prefix].each{|key| opts.delete(key)}
69
69
  if opts[:as]
70
70
  as_opt = opts.delete(:as)
71
71
  opts = polymorphic_constraints(as_opt).merge(opts)
@@ -115,8 +115,8 @@ module Stonean
115
115
  end
116
116
  end
117
117
 
118
- def define_accessors(model_sym, attr, prefix)
119
- accessor_method_name = ( prefix ? "#{model_sym}_#{attr}" : attr)
118
+ def define_accessors(model_sym, attr, options)
119
+ accessor_method_name = ( options[:prefix] ? "#{model_sym}_#{attr}" : attr)
120
120
 
121
121
  define_method accessor_method_name do
122
122
  eval("self.#{model_sym} ? self.#{model_sym}.#{attr} : nil")
@@ -126,7 +126,7 @@ module Stonean
126
126
  model_defined = eval("self.#{model_sym}")
127
127
 
128
128
  unless model_defined
129
- klass = model_sym.to_s.classify
129
+ klass = options[:class_name] || model_sym.to_s.classify
130
130
  eval("self.#{model_sym} = #{klass}.new")
131
131
  end
132
132
 
@@ -2,7 +2,7 @@ module Lockdown #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 10
5
+ TINY = 11
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Lockdown</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/lockdown"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.10</a>
36
+ <a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.11</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-24 00:00:00 -04:00
12
+ date: 2008-06-25 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency