Fixes mime -> MIME

This commit is contained in:
Datt Dongare 2022-10-02 07:10:43 +05:30
parent f8e97a1464
commit 3dcaca9a9e
5 changed files with 6 additions and 6 deletions

View File

@ -267,7 +267,7 @@ map.resources :products, :except => :destroy
* Benchmarking numbers are now reported in milliseconds rather than tiny fractions of seconds
* Rails now supports HTTP-only cookies (and uses them for sessions), which help mitigate some cross-site scripting risks in newer browsers.
* `redirect_to` now fully supports URI schemes (so, for example, you can redirect to a svn`ssh: URI).
* `render` now supports a `:js` option to render plain vanilla JavaScript with the right mime type.
* `render` now supports a `:js` option to render plain vanilla JavaScript with the right MIME type.
* Request forgery protection has been tightened up to apply to HTML-formatted content requests only.
* Polymorphic URLs behave more sensibly if a passed parameter is nil. For example, calling `polymorphic_path([@project, @date, @area])` with a nil date will give you `project_area_path`.

View File

@ -349,7 +349,7 @@ Please refer to the [Changelog][action-pack] for detailed changes.
names instead.
([commit](https://github.com/rails/rails/commit/83b767ce))
* Deprecated accessing mime types via constants (e.g. `Mime::HTML`). Use the
* Deprecated accessing MIME types via constants (e.g. `Mime::HTML`). Use the
subscript operator with a symbol instead (e.g. `Mime[:html]`).
([Pull Request](https://github.com/rails/rails/pull/21869))

View File

@ -262,7 +262,7 @@ Please refer to the [Changelog][action-pack] for detailed changes.
[Commit](https://github.com/rails/rails/commit/619b1b6353a65e1635d10b8f8c6630723a5a6f1a),
[Commit](https://github.com/rails/rails/commit/4ec8bf68ff92f35e79232fbd605012ce1f4e1e6e))
* Register most popular audio/video/font mime types supported by modern
* Register most popular audio/video/font MIME types supported by modern
browsers.
([Pull Request](https://github.com/rails/rails/pull/31251))

View File

@ -1173,7 +1173,7 @@ end
```
Now that you have a module that modifies the input data, it's time to register
it as a preprocessor for your mime type.
it as a preprocessor for your MIME type.
```ruby
Sprockets.register_preprocessor 'text/css', AddComment

View File

@ -173,7 +173,7 @@ cache.
### Shared Partial Caching
It is possible to share partials and associated caching between files with different mime types. For example shared partial caching allows template writers to share a partial between HTML and JavaScript files. When templates are collected in the template resolver file paths they only include the template language extension and not the mime type. Because of this templates can be used for multiple mime types. Both HTML and JavaScript requests will respond to the following code:
It is possible to share partials and associated caching between files with different MIME types. For example shared partial caching allows template writers to share a partial between HTML and JavaScript files. When templates are collected in the template resolver file paths they only include the template language extension and not the MIME type. Because of this templates can be used for multiple MIME types. Both HTML and JavaScript requests will respond to the following code:
```ruby
render(partial: 'hotels/hotel', collection: @hotels, cached: true)
@ -187,7 +187,7 @@ Another option is to include the full filename of the partial to render.
render(partial: 'hotels/hotel.html.erb', collection: @hotels, cached: true)
```
Will load a file named `hotels/hotel.html.erb` in any file mime type, for example you could include this partial in a JavaScript file.
Will load a file named `hotels/hotel.html.erb` in any file MIME type, for example you could include this partial in a JavaScript file.
### Managing dependencies