[Haml] Convert Haml::Helpers::ActionViewExtensions docs to YARD.
This commit is contained in:
parent
83b0fc8209
commit
f60d0f691e
|
@ -1,5 +1,7 @@
|
||||||
require 'haml/helpers/action_view_mods'
|
if defined?(ActionView)
|
||||||
require 'haml/helpers/action_view_extensions'
|
require 'haml/helpers/action_view_mods'
|
||||||
|
require 'haml/helpers/action_view_extensions'
|
||||||
|
end
|
||||||
|
|
||||||
module Haml
|
module Haml
|
||||||
# This module contains various helpful methods to make it easier to do various tasks.
|
# This module contains various helpful methods to make it easier to do various tasks.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
require 'haml/helpers/action_view_mods'
|
require 'haml/helpers/action_view_mods'
|
||||||
|
|
||||||
if defined?(ActionView)
|
module Haml
|
||||||
module Haml
|
|
||||||
module Helpers
|
module Helpers
|
||||||
# This module contains various useful helper methods
|
# This module contains various useful helper methods
|
||||||
# that either tie into ActionView or the rest of the ActionPack stack,
|
# that either tie into ActionView or the rest of the ActionPack stack,
|
||||||
|
@ -12,7 +11,7 @@ if defined?(ActionView)
|
||||||
# Returns a value for the "class" attribute
|
# Returns a value for the "class" attribute
|
||||||
# unique to this controller/action pair.
|
# unique to this controller/action pair.
|
||||||
# This can be used to target styles specifically at this action or controller.
|
# This can be used to target styles specifically at this action or controller.
|
||||||
# For example, if the current action were EntryController#show,
|
# For example, if the current action were `EntryController#show`,
|
||||||
#
|
#
|
||||||
# %div{:class => page_class} My Div
|
# %div{:class => page_class} My Div
|
||||||
#
|
#
|
||||||
|
@ -20,8 +19,7 @@ if defined?(ActionView)
|
||||||
#
|
#
|
||||||
# <div class="entry show">My Div</div>
|
# <div class="entry show">My Div</div>
|
||||||
#
|
#
|
||||||
# Then, in a stylesheet
|
# Then, in a stylesheet (shown here as {Sass}),
|
||||||
# (shown here as Sass),
|
|
||||||
# you could refer to this specific action:
|
# you could refer to this specific action:
|
||||||
#
|
#
|
||||||
# .entry.show
|
# .entry.show
|
||||||
|
@ -32,14 +30,11 @@ if defined?(ActionView)
|
||||||
# .entry
|
# .entry
|
||||||
# :color #00f
|
# :color #00f
|
||||||
#
|
#
|
||||||
|
# @return [String] The class name for the current page
|
||||||
def page_class
|
def page_class
|
||||||
controller.controller_name + " " + controller.action_name
|
controller.controller_name + " " + controller.action_name
|
||||||
end
|
end
|
||||||
|
|
||||||
# :stopdoc:
|
|
||||||
alias_method :generate_content_class_names, :page_class
|
alias_method :generate_content_class_names, :page_class
|
||||||
# :startdoc:
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
if defined?(ActionView) and not defined?(Merb::Plugins)
|
module ActionView
|
||||||
module ActionView
|
|
||||||
class Base
|
class Base
|
||||||
def render_with_haml(*args, &block)
|
def render_with_haml(*args, &block)
|
||||||
options = args.first
|
options = args.first
|
||||||
|
@ -172,6 +171,4 @@ if defined?(ActionView) and not defined?(Merb::Plugins)
|
||||||
alias_method :form_for, :form_for_with_haml
|
alias_method :form_for, :form_for_with_haml
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue