casey_jones 0.0.119 → 0.0.120

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,23 @@
1
1
 
2
2
  module CaseyJones
3
3
  module ActiveRecord
4
+ def acts_as_sitemap
5
+ class_eval do
6
+ has_one :sitemap, :conditions=>"resource_class = #{name.underscore}", :foreign_key=>'resource_id'
7
+
8
+ def menu_text
9
+ self.sitemap.menu_text if self.sitemap
10
+ end
11
+ def menu_text=(t)
12
+ self.sitemap ||= Sitemap.new(:resource=>self)
13
+ self.sitemap.menu_text = t unless t.empty?
14
+ end
15
+ validates :menu_text, :presence=>true, :length=>{:minimum=>3, :maximum=>50}
16
+ end
17
+ end
18
+
19
+
20
+
4
21
  def autocomplete_format(&block)
5
22
  class_eval do
6
23
  @autocomplete_block = block
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: casey_jones
3
3
  version: !ruby/object:Gem::Version
4
- hash: 241
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 119
10
- version: 0.0.119
8
+ - 120
9
+ version: 0.0.120
11
10
  platform: ruby
12
11
  authors:
13
12
  - Tyler Gannon
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-08-22 00:00:00 -07:00
17
+ date: 2010-09-03 00:00:00 -07:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -88,7 +87,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
87
  requirements:
89
88
  - - ">="
90
89
  - !ruby/object:Gem::Version
91
- hash: 3
92
90
  segments:
93
91
  - 0
94
92
  version: "0"
@@ -97,7 +95,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
95
  requirements:
98
96
  - - ">="
99
97
  - !ruby/object:Gem::Version
100
- hash: 3
101
98
  segments:
102
99
  - 0
103
100
  version: "0"