Commit Graph

1213 Commits

Author SHA1 Message Date
Rafael Mendonça França 60b040e362 Add some Action Cable CHANGELOG entries
And improve changelongs.

[ci skip]
2016-02-01 19:57:50 -02:00
Sean Griffin 49f6ce63f3 Preparing for Rails 5.0.0.beta2 2016-02-01 14:37:52 -07:00
Matthew Draper d6f2000a67 Wrangle the asset build into something that sounds more general 2016-02-01 05:03:03 +10:30
Ryan Bigg e2ca039e5a Slice out options for cache_fragment_name explicitly
This allows expire_in (and other options) to be passed to the cache method
2016-01-28 11:02:48 +11:00
Rafael Mendonça França e5e42a3687 Add tests to #23288 2016-01-27 14:12:32 -05:00
Bart de Water 5e3a23a307 Fix img alt attribute generation when using Sprockets >= 3.0 2016-01-27 19:38:13 +01:00
Daniel Gomez de Souza 18e700e9d6 Fix doc [ci skip] 2016-01-27 10:49:58 -03:00
Jon Moss f31a386c7e Fix sanitizer tests
These tests were failing due to backwards incompatible changes, as apart
of the v1.0.3 release of rails-html-sanitizer.
2016-01-26 20:16:48 -05:00
Aaron Patterson 6dfab475ca Merge branch '5-0-beta-sec'
* 5-0-beta-sec:
  bumping version
  fix version update task to deal with .beta1.1
  Eliminate instance level writers for class accessors
  allow :file to be outside rails root, but anything else must be inside the rails view directory
  Don't short-circuit reject_if proc
  stop caching mime types globally
  use secure string comparisons for basic auth username / password
2016-01-25 11:25:11 -08:00
Aaron Patterson 908c011395 bumping version 2016-01-25 10:22:15 -08:00
Aaron Patterson b7758b40fc allow :file to be outside rails root, but anything else must be inside the rails view directory
CVE-2016-0752
2016-01-22 15:02:27 -08:00
Vipul A M b387d9a14a html_safe is not supposed to be public API for AV. This change removes usage of html_safe in favour of raw() in AV helpers.
Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
2016-01-20 12:38:59 +05:30
Jon Moss 98076af2ef Remove ActionView dependence on ActionPack's Mime implementation 2016-01-17 12:20:52 -05:00
Kasper Timm Hansen 91f2ad3682 Store the symbols as an array.
A Set can't be implicitly converted into an Array:

```
irb(main):012:0> formats = [ :rss ]
=> [:rss]
irb(main):013:0> formats &= SET.symbols
TypeError: no implicit conversion of Set into Array
    from (irb):13:in `&'
    from (irb):13
    from /Users/kasperhansen/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'
```

Besides `Mime::SET.symbols` returns an Array, so we're closer to that.
2016-01-17 17:24:41 +01:00
Kasper Timm Hansen 85146f6de0 Enrich the SET constant to respond to symbols.
Match `Mime::SET.symbols`.
2016-01-17 17:23:58 +01:00
Kasper Timm Hansen eb4ec6648d Don't bother looking up the types.
If they aren't symbols, then they aren't likely to be in the set anyway.
2016-01-17 16:31:13 +01:00
Kasper Timm Hansen b1dcfa782e Replace class attribute with SET constant.
We'll be using this to map over to Action Dispatch's Mime::Set.
2016-01-17 16:31:13 +01:00
Kasper Timm Hansen c10bb2996a Remove register abstraction.
The template types is a private abstraction to fill in basic blanks from Action Dispatch's
mime types. As such we can modify the data structure ourselves.
2016-01-17 16:31:12 +01:00
Kasper Timm Hansen bb295be314 Replace delegate calls with standard method defs.
Spares a to_sym call by aliasing to_sym to ref.

Then the delegate felt meager for one method; ditch and define method ourselves.
2016-01-17 16:31:12 +01:00
Kasper Timm Hansen f48098bd80 Spare to_sym call in `==`.
The @symbol has already been converted to a symbol in initialize, so no need to call to_sym
when comparing it.

Ditch early return for a simple unless statement.
2016-01-17 16:31:03 +01:00
Kasper Timm Hansen 41ebb5564d Make ref return the internal symbol.
We delegate to_sym to the internal symbol, which we've already called to_sym on in
initialize, so we don't need to do that.

We also know to_sym will never return a falsy value, so we'll never hit to_s.

Just return the symbolized symbol.
2016-01-17 15:20:35 +01:00
Rafael Mendonça França f5065ef60c Merge pull request #20046 from yoongkang/ladida
Use ActiveSupport::SafeBuffer when flushing content_for
2016-01-16 04:23:27 -02:00
Yves Senn f5ab4055b9 docs, formatting pass over changelogs. [ci skip] 2016-01-13 10:19:55 +01:00
Kasper Timm Hansen 0cffe1b316 Merge pull request #20638 from jaimeiniesta/locale-aware-pluralize-helper
Pass the current locale to Inflector from the pluralize text helper.
2016-01-10 21:42:03 +01:00
Jaime Iniesta 82aab15dac Pass the current locale to Inflector from the pluralize text helper.
The pluralize text helper uses the Inflector to determine the plural
form. The inflector accepts an optional parameter for the locale,
so we can pass it from the text helper to have locale-aware pluralizations
on the text helpers level.

The pluralize text helper now only accepts 2 positional arguments:
`count` and `singular`. Passing `plural` as a positional argument
is now deprecated.
2016-01-10 20:47:41 +01:00
Akshay Vishnoi 1a43e4c522 [ci skip] fix typo 2016-01-10 02:04:35 +05:30
Akira Matsuda & saya 76c385709c [doc] The capture method isn't always used inside views to create a variable
but rather very often used inside helpers to directly return a String value.
[ci skip]
2016-01-08 18:08:11 +09:00
yui-knk 54aaf85e4f Suppress warning (instance variable @persisted not initialized) 2016-01-07 10:24:54 +09:00
Rafael França ced9612b59 Merge pull request #22275 from mastahyeti/per-form-csrf
Per-form CSRF tokens
2016-01-06 02:55:10 -02:00
Santiago Pastorino b7b508aa79 Prefer inspect over escaping and sorround by quote marks 2016-01-05 18:32:16 -03:00
Santiago Pastorino 8a998b0fa7 Add Html template handler that wraps Raw output in an OutputBuffer
This fixes the case when you try to render an html you know safe and the
file is named something.html. With this commit the content of the html
won't be escaped anymore because AV won't use Raw handler and choose
Html handler instead.
2016-01-05 16:54:39 -03:00
Ben Toews 3e98819e20 add option for per-form CSRF tokens 2016-01-04 12:26:38 -07:00
Rafael França 4158974c60 Merge pull request #22764 from stevenspiel/titleize_model_name_for_default_submit_button_value
titleize the model name on default submit buttons
2016-01-04 11:10:44 -02:00
Steven Spiel c74f9cc0e8 downcase default submit button value's model name 2016-01-01 19:59:11 -05:00
Rashmi Yadav 1b608a695c Update copyright notices to 2016 [ci skip] 2015-12-31 18:27:19 +02:00
Santiago Pastorino 7e583b73c4 Fix collection_radio_buttons' hidden_field name and make it appear before the radios
Fixes #22773
2015-12-31 00:40:37 -03:00
Yves Senn 892658a3d2 Merge pull request #22829 from jcoyne/test_parameters
TestController#parameters returns AC::Parameters
2015-12-30 08:52:26 +01:00
Akshay Vishnoi 16d6497a50 Fix typo 2015-12-30 10:43:24 +05:30
Justin Coyne d8e98897b5 TestController#parameters returns AC::Parameters
Fixes #22827
ActionView::TestCase::TestController#parameters should return an
instance of ActionController::Parameters rather than a hash. This
enables helper methods to use the correct interface.
2015-12-29 14:40:17 -06:00
Eileen M. Uchitelle 85048e90ab Merge pull request #22759 from akshay-vishnoi/human-size-helper
Add support for Petabyte and Exabyte in number to human size
2015-12-27 09:56:43 -05:00
Yves Senn fefd76e82a Merge pull request #22778 from y-yagi/fix_submit_tag_with_symbol_value
fix TypeError when using submit_tag with Symbol value
2015-12-24 10:20:26 +01:00
yuuji.yaginuma 621ed494f5 fix TypeError when using submit_tag with Symbol value 2015-12-24 08:04:25 +09:00
Derek Prior d86c110b93
Add caveat to number_to_currency docs [ci skip]
I've worked on a few applications that have gone through the
internationalization process and had issues because they were using
`number_to_currency`. The minute a user is allowed to change their
locale, they can change the price displayed on a page from 10 US dollars
to 10 Mexican Pesos, which is far from the same amount of money.

Unlike other helpers that rely on i18n, `number_to_currency` does not
produce equivalent results when the locale is changed.

As I've explained this to a few groups of developers now, I thought it
might make for a good caveat in the docs.
2015-12-23 14:04:52 -05:00
Rafael Mendonça França 2ad6deb534 Require only the concurrent/map feature 2015-12-23 15:41:07 -02:00
Akshay Vishnoi 3d1f95d0e8 Add support for Petabyte and Exabyte in number to human size 2015-12-22 23:07:06 +05:30
Yves Senn 68c5c01db0 release notes, extract notable changes from Action View CHANGELOG.
[ci skip]
2015-12-22 13:26:59 +01:00
yuuji.yaginuma b441c5d191 do not use `div_for` in example [ci skip]
`div_for` removed in 01e94ef
2015-12-22 14:36:24 +09:00
Genadi Samokovarov c5b6ec7b0f No more no changes entries in the CHANGELOGs
During the `5.0.0.beta1` release, the CHANGELOGs got an entry like the
following:

```
* No changes.
```

It is kinda confusing as there are indeed changes after it. Not a
biggie, just a small pass over the CHANGELOGs.

[ci skip]
2015-12-21 11:46:38 +02:00
yuuji.yaginuma 767427719e fix typo in config value [ci skip] 2015-12-19 11:39:15 +09:00
eileencodes 099ddfdefd Add CHANGELOG headers for Rails 5.0.0.beta1 2015-12-18 15:58:25 -05:00