Commit Graph

5245 Commits

Author SHA1 Message Date
Ryan Bigg
1e63a05d28 Add "a" to make it better English
[#3796 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-07 11:40:57 -02:00
Xavier Noria
db520042b3 Merge branch 'master' of git://github.com/lifo/docrails 2010-10-06 23:16:13 +02:00
Thomas McDonald
3ca6988b78 Fixed typo in engine documentation 2010-10-06 22:11:03 +01:00
Rafael Mendonça França
a0552d653b Fixes typo 2010-10-06 12:55:16 -03:00
José Valim
d649bf158b Provide a cleaner syntax for paths configuration that does not rely on method_missing. 2010-10-06 17:20:15 +02:00
wycats
d40ca9cce2 Some initial docs 2010-10-06 03:06:12 -07:00
wycats
0904e82568 Delegate everything to the generator 2010-10-06 02:58:49 -07:00
wycats
848eb0d777 Revert "Clean up the builder abstraction in AppGenerator."
The phrase "clean up" misrepresents the fact that this removes
a feature that ships with Rails 3.0.

This reverts commit 6774e12afa0f29442aa612ddf6e51d5a1b7a4356.
2010-10-06 02:53:00 -07:00
José Valim
6774e12afa Clean up the builder abstraction in AppGenerator.
This commit may be reverted once documentation and a proper way to handle actions are added.
2010-10-06 11:13:57 +02:00
Aditya Sanghi
ae812e9fc9 adding test for namedspaced mailers 2010-10-06 19:45:13 +11:00
Xavier Noria
3b7d48cc45 a couple of touches to the guides guidelines 2010-10-05 22:52:43 +02:00
Xavier Noria
da34ee423f aaaaannnddd, your beloved typo only spotted in the github colored diff no matter how many passes you did before pushing 2010-10-05 19:38:05 +02:00
Xavier Noria
360a878070 new guide: Ruby on Rails Guides Guidelines 2010-10-05 19:34:27 +02:00
José Valim
68d75c3365 Don't expect an AD::Response object back from the app. 2010-10-05 09:55:51 +02:00
José Valim
4a4ff148ff Use RbConfig instead of Config for 1.9.3 compatibility. 2010-10-05 09:48:32 +02:00
José Valim
848e48ec9c Link to rack from github for this while. 2010-10-04 18:08:03 +02:00
José Valim
10d014acb8 Update to Thor 0.14.3. 2010-10-04 13:46:37 +02:00
Piotr Sarnacki
adfd43a4da Add documentation on app_generators 2010-10-03 23:32:03 +02:00
José Valim
74dd8a3681 Move ETag and ConditionalGet logic from AD::Response to the middleware stack. 2010-10-03 21:25:22 +02:00
Nicholas E. May (on Enterprise)
467d20c897 Section 6, table, typo (extra '.rb') 2010-10-03 00:37:15 -05:00
Nicholas E. May (on Enterprise)
bcc103367b Section 4.3, wrong word used: 'contact' => 'content' 2010-10-02 23:05:08 -05:00
Nicholas E. May (on Enterprise)
ab7b99f150 Section 3.3: '# bundle install' instead of just 'bundle install' 2010-10-02 22:43:45 -05:00
Nicholas E. May (on Enterprise)
ffe24354cc Section 3.2, table: 'README.rdoc' -> 'README' 2010-10-02 22:26:26 -05:00
Nicholas E. May (on Enterprise)
a72edab3b3 Removed unnecessary 'the' in the '2.2.9 Active Suport' section of Getting Started. 2010-10-02 21:57:01 -05:00
José Valim
49cc01002e Be more explicit about what is deprecated. 2010-10-02 09:40:54 -07:00
José Valim
04cbabb0a0 Deprecate generators in Railties. You should use app_generators instead. 2010-10-02 18:38:23 +02:00
José Valim
757bbd540c :'' is not valid ruby. 2010-10-02 18:30:38 +02:00
José Valim
7b0c592e38 reload_routes! is part of the public API and should not be removed. 2010-10-02 17:45:26 +02:00
José Valim
609849a0f1 Fix a routing test. Reorganize middleware tests. 2010-10-02 17:42:36 +02:00
Xavier Noria
542ddd8c89 brings csrf_meta_tags back to the generated layout
After more discussion, it has be agreed that this kind
of changes within reasonable margins are OK for 3.1.
That is, it is fine to change a little bit the generators
even if that means examples in existing books won't be
exact. (Note that the singular csrf_meta_tag exists as an
alias and thus those outdated examples will run, same for
existing applications.)
2010-10-02 00:10:32 +02:00
Neeraj Singh
33733d5d1d no need to check for nil 2010-09-30 23:59:09 +08:00
Jaime Iniesta
ef554156c4 Action Mailer Basics guide - reformatted configuration table 2010-09-30 12:23:52 +02:00
Jaime Iniesta
ae65a1f1df Action Mailer Basics guide - fixed typos 2010-09-30 12:11:51 +02:00
José Valim
6b248f6ea5 Add more information to comments. 2010-09-30 10:33:31 +02:00
Piotr Sarnacki
9f569c60ad Try to guess application's directory while trying to run the server, but only if config.ru is not present in current dir 2010-09-30 10:27:55 +02:00
Piotr Sarnacki
3049e645e5 Moved Rails::RoutesReloader to Rails::Application::RoutesReloader 2010-09-30 09:47:06 +02:00
Piotr Sarnacki
6648babded Allow running generators for Engine with usage of other application.
After that commit, developers can set ENGINE_PATH in ENGINE/scripts/rails
file and load application's ./script/rails (most of the time it will be
dummy application used for testing). When running ./script/rails g it will
use application to boot up, but then it will use Engine's root and
configuration for generators.
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
f851352318 Added config.app_generators to allow configuring application's generators from railties.
With config.generators becomes a way to configure generators
for current instance only. For example:

module Blog
  class Engine < Rails::Engine
    config.generators do |g|
      g.orm :active_record
    end

    config.app_generators do |g|
      g.test_framework :rspec
    end
  end
end

such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:

module MyApp
  class Application < Rails::Application
    config.generators do |g|
      g.test_framework :test_unit
    end
  end
end
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
57aa79e6be Move routes_reloader to a class: RoutesReloader 2010-09-30 09:47:06 +02:00
Piotr Sarnacki
ec5d846ac6 Properly reload routes defined in class definition
Sometimes it's easier to define routes inside Engine or
Application class definition (e.g. one file applications). The
problem with such case is that if there is a plugin that
has config/routes.rb file, it will trigger routes reload on application.
Since routes definition for application is not in config/routes.rb
file routes_reloader will fail to reload application's routes
properly. With this commit you can pass routes definition as a block
to routes method, which will allow to properly reload it:

class MyApp::Application < Rails::Application
  routes do
    resources :users
  end
end
2010-09-30 09:47:05 +02:00
Piotr Sarnacki
74598fe7e9 Do not overwrite _railtie method on namespace while creating isolated engine or application.
In order to run Engine as standalone application, you will need
Rails::Application instance in the same namespace that engine
one. It's very important to leave _railtie bound to whatever
used "namespace" method first.
2010-09-30 09:47:05 +02:00
Xavier Noria
a617f6bc4c Merge branch 'master' of github.com:lifo/docrails 2010-09-29 20:26:42 +02:00
Joost Baaij
b1acba7bb8 Cleanup of the References section.
Removed non-functional links.
Removed links to API documentation.
Removed link to Rails 2 material.

Renamed "References" to "Further Reading".
2010-09-29 15:56:16 +02:00
Joost Baaij
3c620bed8c Removed obsolete "advanced" plugin URLs.
These plugins are obsolete even for Rails 2, they have no place in a Rails 3 guide.
Also removed "mad cool" reference.

If anyone has ideas about cache plugins that *must* be included, I would love to know.
As far as I am concerned the rails guides should stick to built-in methods and have a
simple list of references for people wishing to investigate further.

I will check out the references after this commit to see if they're up to date.
2010-09-29 15:51:09 +02:00
Santiago Pastorino
006cef7107 Add gem 'arel' from git commented out as an example of how to Bundle egde Rails with Arel edge
[#5723 state:committed]
2010-09-29 00:14:48 -03:00
Santiago Pastorino
14d2feeeab Bump up some deps 2010-09-26 00:29:38 -03:00
Carlos Antonio da Silva
7fc1edd790 Remove deprecated stuff in ActionController
This removes all deprecated classes in ActionController related to
Routing, Abstract Request/Response and Integration/IntegrationTest.
All tests and docs were changed to ActionDispatch instead of ActionController.
2010-09-26 02:13:45 +08:00
Piotr Sarnacki
f8294cb8ba Fix app and actions generators tests
Normally Rails.application is an instance, but for those
tests Rails.application needs to be class.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:39 +02:00
Piotr Sarnacki
0134c5cc94 Refactor a few methods connected with namespacing in Rails::Generators::NamedBase
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
51c7660e08 Add namespacing to mailer generator
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00