aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/creating_plugins/view_helper.txt
diff options
context:
space:
mode:
authorJeff Dean <jeff@zilkey.com>2008-11-12 02:05:19 -0500
committerJeff Dean <jeff@zilkey.com>2008-11-12 02:05:19 -0500
commit40bc386ed8cc403050292ab19428f1e467fa1737 (patch)
treea51e14c1ec6e1512ae34278fbad6c5c6f1ac03ef /railties/doc/guides/source/creating_plugins/view_helper.txt
parent7f24653e7a39da9eb85b282e929d0712b2f1c9b7 (diff)
downloadrails-40bc386ed8cc403050292ab19428f1e467fa1737.tar.gz
rails-40bc386ed8cc403050292ab19428f1e467fa1737.tar.bz2
rails-40bc386ed8cc403050292ab19428f1e467fa1737.zip
Plugin Guide: cleaned up file paths, made formatting more consistent
Diffstat (limited to 'railties/doc/guides/source/creating_plugins/view_helper.txt')
-rw-r--r--railties/doc/guides/source/creating_plugins/view_helper.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/doc/guides/source/creating_plugins/view_helper.txt b/railties/doc/guides/source/creating_plugins/view_helper.txt
index b03a190e1a..4eaec93824 100644
--- a/railties/doc/guides/source/creating_plugins/view_helper.txt
+++ b/railties/doc/guides/source/creating_plugins/view_helper.txt
@@ -8,10 +8,10 @@ Creating a view helper is a 3-step process:
First, create the test to define the functionality you want:
+*vendor/plugins/yaffle/test/view_helpers_test.rb*
+
[source, ruby]
---------------------------------------------------------------
-# File: vendor/plugins/yaffle/test/view_helpers_test.rb
-
require File.dirname(__FILE__) + '/test_helper.rb'
include YaffleViewHelper
@@ -28,20 +28,20 @@ end
Then add the following statements to init.rb:
+*vendor/plugins/yaffle/init.rb*
+
[source, ruby]
---------------------------------------------------------------
-# File: vendor/plugins/yaffle/init.rb
-
require "view_helpers"
ActionView::Base.send :include, YaffleViewHelper
---------------------------------------------------------------
Then add the view helpers file and
+*vendor/plugins/yaffle/lib/view_helpers.rb*
+
[source, ruby]
---------------------------------------------------------------
-# File: vendor/plugins/yaffle/lib/view_helpers.rb
-
module YaffleViewHelper
def squawk_info_for(yaffle)
returning "" do |result|