| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
As requested by David in 23233.
|
|
|
|
|
|
| |
Added javascript to update the URL on mailer previews with the
currently selected email format. Reloading the page now keeps you on
your selected format rather than going back to the default html version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
that support multiple Rails versions would've had to feature-detect
whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
`Mime[:foo]` has been around for ages to look up registered MIME types
by symbol / extension, though, so libraries and plugins can safely
switch to that without breaking backward- or forward-compatibility.
Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
by type or extension, so it's not available as `Mime[:all]`. We use it
internally as a wildcard for `respond_to` negotiation. If you use this
internal constant, continue to reference it with `Mime::ALL`.
Ref. efc6dd550ee49e7e443f9d72785caa0f240def53
|
|
|
|
| |
Accessing mime types via constants is deprecated.
|
|
|
|
|
| |
Display attachment filenames as a comma separated list rather than
showing the inspect output for the array.
|
|
|
|
|
|
| |
Use the mail gem's own API to locate the correct part.
Fixes #14435.
|
|
|
|
| |
a subdirectory, closes #19092.
|
| |
|
|
|
|
|
|
| |
While this was true before when every `dd` had a value,
this patch makes sure that everything keeps lining up even
when the `dd` node is blank.
|
| |
|
| |
|
|
|
|
| |
800 pixels, and the full available screen size is not being used.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
deliver. These other views (properties, routes) are not designed to be loaded in isolation
|
| |
|
|
|
|
|
| |
Both `rails/info/properties` and `rails/info/routes` have same html
title attribute as *Routes*. This commit includes a fix for the titles.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Match Dev/Prod parity for Index Page
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
It is semantically correct than relative path.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This reverts commit ae68fc3864e99ab43c18fd12577744e1583f6b64, reversing
changes made to 0262a18c7b0ab6f60fee842b3007388f9ffeb0fa.
See here: https://github.com/rails/rails/pull/8499#issuecomment-11356417
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|