1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge branch 'master' of git://github.com/lifo/docrails

This commit is contained in:
Xavier Noria 2011-05-04 20:15:00 +02:00
commit 47e1cca5dc
2 changed files with 35 additions and 35 deletions

View file

@ -240,8 +240,8 @@ module Rails
# text_field :title # => <input type="text" name="article[title]" id="article_title" />
# end
#
# Additionally isolated engine will set its name according to namespace, so
# MyEngine::Engine.engine_name #=> "my_engine". It will also set MyEngine.table_name_prefix
# Additionally an isolated engine will set its name according to namespace, so
# MyEngine::Engine.engine_name will be "my_engine". It will also set MyEngine.table_name_prefix
# to "my_engine_", changing MyEngine::Article model to use my_engine_article table.
#
# == Using Engine's routes outside Engine
@ -250,7 +250,7 @@ module Rails
# <tt>url_helpers</tt> inside +Application+. When you mount an engine in an application's routes, a special helper is
# created to allow you to do that. Consider such a scenario:
#
# # APP/config/routes.rb
# # config/routes.rb
# MyApplication::Application.routes.draw do
# mount MyEngine::Engine => "/my_engine", :as => "my_engine"
# match "/foo" => "foo#index"

View file

@ -156,17 +156,17 @@ module Rails
%w(autoload_once eager_load autoload load_path).each do |m|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{m}!
@#{m} = true
end
def skip_#{m}!
@#{m} = false
end
def #{m}?
@#{m}
end
def #{m}! # def eager_load!
@#{m} = true # @eager_load = true
end # end
#
def skip_#{m}! # def skip_eager_load!
@#{m} = false # @eager_load = false
end # end
#
def #{m}? # def eager_load?
@#{m} # @eager_load
end # end
RUBY
end