Module: Radiant::Taggable
Defined Under Namespace
Modules: ClassMethods, Util
Constant Summary
collapse
- @@tag_descriptions =
{}
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/radiant/taggable.rb', line 5
def self.included(base)
base.extend(ClassMethods)
base.module_eval do
def self.included(new_base)
super
new_base.class_eval do
include ActionController::UrlWriter
end
class << new_base
def default_url_options
{:controller => "site", :action => "show_page", :only_path => true}
end
end
new_base.tag_descriptions.merge! self.tag_descriptions
end
protected
def params
@params ||= request.parameters unless request.nil?
end
def request_uri
@request_url ||= request.request_uri unless request.nil?
end
end
end
|
Instance Method Details
#render_tag(name, tag_binding) ⇒ Object
32
33
34
|
# File 'lib/radiant/taggable.rb', line 32
def render_tag(name, tag_binding)
send "tag:#{name}", tag_binding
end
|
#tag_descriptions(hash = nil) ⇒ Object
40
41
42
|
# File 'lib/radiant/taggable.rb', line 40
def tag_descriptions(hash=nil)
self.class.tag_descriptions hash
end
|
36
37
38
|
# File 'lib/radiant/taggable.rb', line 36
def tags
Util.tags_in_array(methods)
end
|