aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/templates
Commit message (Collapse)AuthorAgeFilesLines
* Remove the navigator for now. Its ugly and it promises more than it can ↵David Heinemeier Hansson2013-12-171-6/+1
| | | | deliver. These other views (properties, routes) are not designed to be loaded in isolation
* Add mailer previews feature based on mail_view gemAndrew White2013-12-174-1/+118
|
* Fix for titles of info pagesSıtkı Bağdat2013-11-221-1/+1
| | | | | Both `rails/info/properties` and `rails/info/routes` have same html title attribute as *Routes*. This commit includes a fix for the titles.
* Revert "Match Dev/Prod parity for Index Page"Piotr Sarnacki2013-07-221-1/+1
| | | | | | | | Showing welcome page in production can expose information, which should not be visible on production if people don't override the default root route. This reverts commit b0caea29c2da9f4c8bb958019813482da297067d.
* Merge pull request #11514 from schneems/schneems/dev-prod-parity-indexPiotr Sarnacki2013-07-221-1/+1
|\ | | | | Match Dev/Prod parity for Index Page
| * Match Dev/Prod parity for Index Pageschneems2013-07-201-1/+1
| | | | | | | | | | | | | | With Rails 4 the default index page was moved from a static file `index.html` inside the `public/` folder to an internal controller/view inside of the railties gem. This was to allow use of erb in the default index page and to remove the requirement that new apps must delete a static file to make their index pages work. While this was a good change, the functionality was unexpected to developers who wish to get their apps running in production ASAP. They will create a new app `rails new my app`, start a server to verify it works, then immediately deploy the app to verify that it can start working in production. Unfortunately locally they see a page when they visit `localhost:3000` when they visit their production app they get an error page. We initially anticipated this problem in the original pull request, but did not properly anticipate the severity or quantity of people who would like this functionality. Having a default index page serves as an excellent litmus test for a passed deploy on default apps, and it is very unexpected to have a page work locally, but not on production. This change makes the default index page available in production if the developer has not over-written it by defining their own `root` path inside of routes.
* | Removed information about creating database[ci skip]Prathamesh Sonpatki2013-07-201-2/+2
|/ | | | | | | | | | | | - As default index page is no longer in public folder, rails hits the welcome controller in railties for index action - If the database is not created or username and password are incorrect in database.yml, those errors are first shown before index action succeeds - welcome#index succeeds iff the database is created with correct details in database.yml - So this information about creating database is not required in the index template
* Remove rails.png.Steve Klabnik2013-04-021-1/+1
| | | | | | | No reason to have a file, we've got data-URIs now! It didn't make sense to me that you no longer have to remove public/index.html, but you still need to remove rails.png. This means that you won't have to any more when making a new Rails app.
* Use absolute pathRyunosuke SATO2013-01-081-3/+3
| | | | It is semantically correct than relative path.
* Move table routes formatter class to the inspector and rename itCarlos Antonio da Silva2013-01-061-1/+1
| | | | | | | It feels more consistent to have this class called "HtmlTableFormatter", and to have it here with the routes inspector and console formatter, since it's used for both routing error exceptions and the rails info page.
* Improve javascript in welcome page [ci skip]Carlos Antonio da Silva2013-01-061-4/+5
|
* allow toggling about env, not just showingGosha Arinich2013-01-051-7/+11
|
* Move style to head to make routes page valid html5Carlos Antonio da Silva2013-01-051-0/+2
|
* Change Rails Info controller to use the new table routes formatterCarlos Antonio da Silva2013-01-051-4/+1
|
* Don't use layout when requested from xhrRyunosuke SATO2013-01-051-2/+3
|
* Remove the fallback onto `ActiveXObject("Microsoft.XMLHTTP")`.Franck Verrot2013-01-041-6/+2
|
* Apply `var` keyword to js at welcome#indexRyunosuke SATO2013-01-041-1/+2
|
* fix alignment in rails info properties page [ci skip]Vijay Dev2013-01-011-0/+2
|
* Format routes as html on debug pageschneems2012-12-171-74/+4
| | | | | | | | | When someone gets a routing exception, the routes are rendered (starting in Rails 4.0). This PR brings parity between the html routes in the `rails/info/routes` path and when rendered from an exception. This is the continuation of #8521 which brought html formatted routes. In addition to bringing parity to the two views, we're keeping our views DRY by rendering off of the same partials. In this case Railties depends on partials provided by ActionDispatch. I'm open to alternative implementations. Ideally both views will use the same code so any improvements or updates to it will be reproduced on both. <hr /> ![](http://f.cl.ly/items/3O1D0K1v0j0i343O3T3T/Screen%20Shot%202012-12-17%20at%203.07.20%20PM.png)
* HTML formatting to Rails::InfoController#routesschneems2012-12-171-1/+74
| | | | | | | | | | This PR adds formatting and meta-data to the display of the internal routes. Users can now toggle between showing helpers with the `_path` or _`url` suffix. There are multiple ways to achieve this, this method uses partials for formatting and meta-data. The partials can be re-used when rendering `routing_error.erb`, though that will need to be in a separate PR. ![](http://f.cl.ly/items/3A2p3c1T1t2f2X2R2K2S/Screen%20Shot%202012-12-12%20at%202.28.01%20PM.png) ATP Railties
* Revert "Merge pull request #8499 from schneems/schneems/html-route-inspector"Steve Klabnik2012-12-141-26/+1
| | | | | | | This reverts commit ae68fc3864e99ab43c18fd12577744e1583f6b64, reversing changes made to 0262a18c7b0ab6f60fee842b3007388f9ffeb0fa. See here: https://github.com/rails/rails/pull/8499#issuecomment-11356417
* Output routes in :html formatschneems2012-12-121-1/+26
| | | | | | By formatting routes for different media (txt/html) we can apply optimizations based on the format. We can include meta-data in the HTML to allow a rich experience while rendering and viewing the routes. This PR shows route helpers as they are used with the `_path` extension, it also has a javascript toggle on the top to switch to `_url`. This way the developer can see the exact named route helper they can use instead of having to modify a base. This is one example of an optimization that could be applied. Eventually we can link out to guides for the different columns to better explain what helper, HTTP Verb, Path, and Controller#action indicate. We could even add a route search box that could allow developers to input a given route and see all of the routes that match it. These are stand alone features and should be delivered separately.
* Explain how to supersede the new dynamic welcome pageGeorge Claghorn2012-12-111-0/+2
| | | | | | | | The old, static welcome page instructed developers to delete the public/index.html file and set a root route. The new, dynamic welcome page should tell developers (a) why they're seeing it when it doesn't correspond to anything in the viewable app source and (b) that it can be superseded with a root route.
* Use Rails to Render Default Index Pageschneems2012-12-101-0/+240
| | | | | | | | | | | | | | | 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.
* /rails/info/routes path shows routing informationschneems2012-05-243-0/+42
Will show similar contents to the output of `$ rake routes` in the browser in development. This speeds the time required to generate routes, since the application is already initialized.