Skip to content

Commit

Permalink
improve helpers documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Jan 2, 2012
1 parent 4ff6a8c commit ca06364
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.rdoc
Expand Up @@ -679,21 +679,19 @@ route handlers and templates:
bar(params[:name])
end

Helper methods can be separately defined in a module:
Alternatively, helper methods can be separately defined in a module:

module FooUtils
def bar(name)
"#{name}bar"
end
def foo(name) "#{name}foo" end
end

module MooUtils
# ...
module BarUtils
def bar(name) "#{name}bar" end
end

helpers FooUtils, MooUtils
helpers FooUtils, BarUtils

The effect is same as including a module.
The effect is the same as including the modules in the application class.

=== Using Sessions

Expand Down

0 comments on commit ca06364

Please sign in to comment.