1. 19 12月, 2012 1 次提交
  2. 18 12月, 2012 1 次提交
  3. 15 12月, 2012 1 次提交
  4. 14 12月, 2012 2 次提交
  5. 13 12月, 2012 1 次提交
  6. 11 12月, 2012 2 次提交
    • R
      8dac9768
    • S
      Use Rails to Render Default Index Page · baea5d69
      schneems 提交于
      This is an alternative implementation to #7771 thanks to the advice of @spastorino
      
      Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion.
      
      This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. 
      
      In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated.
      
      The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). 
      
      cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik
      
      ATP Railties and Actionpack.
      baea5d69
  7. 10 12月, 2012 7 次提交
  8. 09 12月, 2012 1 次提交
  9. 08 12月, 2012 1 次提交
  10. 07 12月, 2012 4 次提交
  11. 06 12月, 2012 3 次提交
  12. 03 12月, 2012 1 次提交
  13. 02 12月, 2012 3 次提交
  14. 29 11月, 2012 1 次提交
  15. 27 11月, 2012 2 次提交
  16. 19 11月, 2012 1 次提交
    • C
      Fix rails db command with sqlite3 database · 53aefdec
      Carlos Antonio da Silva 提交于
      When using sqlite3 it was attempting to find the database file based on
      Rails.root, the problem is that Rails.root is not always present because
      we try to first manually load "config/database.yml" instead of loading
      the entire app, to make "rails db" faster.
      
      This means that when we're in the root path of the app, calling "rails db"
      won't allow us to use Rails.root, making the command fail for sqlite3
      with the error:
      
          ./rails/commands/dbconsole.rb:62:in `start':
            undefined method `root' for Rails:Module (NoMethodError)
      
      The fix is to simply not pass any dir string to File.expand_path, which
      will make it use the current directory of the process as base, or the
      root path of the app, which is what we want.
      
      When we are in any other subdirectory, calling "rails db" should work
      just fine, because "config/database.yml" won't be found, thus "rails db"
      will fallback to loading the app, making Rails.root available.
      
      Closes #8257.
      53aefdec
  17. 17 11月, 2012 3 次提交
  18. 14 11月, 2012 1 次提交
  19. 11 11月, 2012 2 次提交
  20. 10 11月, 2012 1 次提交
  21. 08 11月, 2012 1 次提交