aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-03-071-2/+8
|\ | | | | | | | | Conflicts: guides/source/4_1_release_notes.md
| * Update doc for TagHelper.Hendy Tanata2014-03-051-2/+8
| |
* | Merge pull request #14285 from ↵Aaron Patterson2014-03-062-7/+3
|\ \ | | | | | | | | | | | | sikachu/master-revert-render-body-remove-content-type Do note remove `Content-Type` when `render :body`
| * | Do note remove `Content-Type` when `render :body`Prem Sichanugrist2014-03-052-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `render :body` should just not set the `Content-Type` header. By removing the header, it breaks the compatibility with other parts. After this commit, `render :body` will returns `text/html` content type, sets by default from `ActionDispatch::Response`, and it will preserve the overridden content type if you override it. Fixes #14197, #14238 This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da.
* | | Introduce `Rails.gem_version`Prem Sichanugrist2014-03-052-7/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method return `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform version comparison. Example: Rails.version #=> "4.1.2" Rails.gem_version #=> #<Gem::Version "4.1.2"> Rails.version > "4.1.10" #=> false Rails.gem_version > Gem::Version.new("4.1.10") #=> true Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true This was originally introduced as `.version` by @charliesome in #8501 but got reverted in #10002 since it was not backward compatible. Also, updating template for `rake update_versions`.
* | Variants in ActionView::DigestorPiotr Chmolowski2014-03-045-22/+103
| | | | | | | | | | | | | | | | | | | | | | Take variants into account when calculating template digests in ActionView::Digest. Digestor#digest now takes a hash as an argument to support variants and allow more flexibility in the future. Old-style arguments have been deprecated. Fixes #14242
* | Use 1.9 style hash on docs [ci skip]Carlos Antonio da Silva2014-03-041-1/+1
| |
* | Simplify handling of defaults/options in button_tagCarlos Antonio da Silva2014-03-041-4/+1
| | | | | | | | | | | | | | | | | | There's no need to rely on Active Support's Hash#reverse_merge for simple cases with default values, since we can just merge from the default rather than reverse merge from the options. This also avoids the creation of one extra hash object by moving to a Hash#merge! call.
* | Added missing changlog entry for #14255Godfrey Chan2014-03-041-0/+7
| |
* | remove private method and rewrite into more precise notationSergey Prikhodko2014-03-041-12/+12
| |
* | rollback to private methodSergey Prikhodko2014-03-031-5/+9
| |
* | cleanup and move extracted method right into the helperSergey Prikhodko2014-03-031-9/+5
| |
* | fix content_or_options to be replaced by options and set to nilSergey Prikhodko2014-03-031-1/+6
| |
* | fix indentationsSergey Prikhodko2014-03-031-4/+3
| |
* | fix form buttonSergey Prikhodko2014-03-031-5/+2
| |
* | fix button tag without optionsSergey Prikhodko2014-03-031-2/+2
| |
* | fix accept nil optionsSergey Prikhodko2014-03-031-3/+5
| |
* | fixes default attributes for button_tagSergey Prikhodko2014-03-032-7/+18
| |
* | Point master changelogs to 4-1-stable branchCarlos Antonio da Silva2014-02-251-331/+1
| | | | | | | | Remove 4-1 related entries from master [ci skip]
* | [skip ci] Fix typo in link_to :method option descriptionMatt Campbell2014-02-241-1/+1
| |
* | refactor, with_locale is not needed because I18n is mocked.Yves Senn2014-02-241-7/+5
| | | | | | | | | | This is a follow up to #14170. While backporting I recognized that this call is not needed at all.
* | Fix ActionView label translation for more than 10 nested elementsVladimir Krylov2014-02-243-2/+20
| |
* | refactor, extract `with_locale` helper.Yves Senn2014-02-241-87/+79
| |
* | update version to 4.2.0.alphaYves Senn2014-02-231-1/+1
|/
* Use the reference for the mime type to get the formatRafael Mendonça França2014-02-184-2/+36
| | | | | | | | Before we were calling to_sym in the mime type, even when it is unknown what can cause denial of service since symbols are not removed by the garbage collector. Fixes: CVE-2014-0082
* Merge branch '4-1-0-beta2'Rafael Mendonça França2014-02-184-6/+58
|\ | | | | | | | | | | Conflicts: actionview/CHANGELOG.md activerecord/CHANGELOG.md
| * Preparing for 4.1.0.beta2 releaseRafael Mendonça França2014-02-182-1/+5
| |
| * Escape format, negative_format and units options of number helpersRafael Mendonça França2014-02-182-5/+53
| | | | | | | | | | | | | | Previously the values of these options were trusted leading to potential XSS vulnerabilities. Fixes: CVE-2014-0081
* | Add `#no_content_type` attribute to `AD::Response`Prem Sichanugrist2014-02-181-0/+5
| | | | | | | | | | Setting this attribute to `true` will remove the content type header from the request. This is use in `render :body` feature.
* | Add missing CHANGELOG entry to Action ViewPrem Sichanugrist2014-02-181-0/+5
| |
* | Fix a fragile test on `action_view/render`Prem Sichanugrist2014-02-181-1/+1
| | | | | | | | | | | | This test were assuming that the list of render options will always be the same. Fixing that so this doesn't break when we add/remove render option in the future.
* | Introduce `render :html` for render HTML stringPrem Sichanugrist2014-02-185-1/+41
| | | | | | | | | | | | | | | | | | This is an option for to HTML content with a content type of `text/html`. This rendering option calls `ERB::Util.html_escape` internally to escape unsafe HTML string, so you will have to mark your string as html safe if you have any HTML tag in it. Please see #12374 for more detail.
* | Introduce `render :plain` for render plain textPrem Sichanugrist2014-02-183-2/+6
| | | | | | | | | | | | | | | | This is as an option to render content with a content type of `text/plain`. This is the preferred option if you are planning to render a plain text content. Please see #12374 for more detail.
* | Introduce `render :body` for render raw contentPrem Sichanugrist2014-02-184-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is an option for sending a raw content back to browser. Note that this rendering option will unset the default content type and does not include "Content-Type" header back in the response. You should only use this option if you are expecting the "Content-Type" header to not be set. More information on "Content-Type" header can be found on RFC 2616, section 7.2.1. Please see #12374 for more detail.
* | implements new option :month_format_string for date select helpers [Closes ↵Xavier Noria2014-02-153-9/+48
| | | | | | | | #13618]
* | Variant negotiationLukasz Strzalkowski2014-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow setting `request.variant` as an array - an order in which they will be rendered. For example: request.variant = [:tablet, :phone] respond_to do |format| format.html.none format.html.phone # this gets rendered end
* | Added tests to render helper that expect `render partial: @foo` toIain Beeston2014-02-122-0/+11
| | | | | | | | | | | | | | | | | | | | automatically call @foo.to_partial_path Calling `render @foo` allows local variables but not options to be passed to the partial renderer. The correct way to render an object AND pass options to the partial renderer is to pass the object in the `:partial` parameter. However, there were previously no tests for this behaviour (in `render_helper_test.rb` at least).
* | Merge pull request #11770 from timruffles/doc_ajax_xhrYves Senn2014-02-031-2/+5
|\ \ | | | | | | be more specific about csrf token and ajax - not whitelisted outside of jquery-rails [ci skip]
| * | be more specific about csrf token and ajax - not whitelisted outside of ↵Tim Ruffles2013-08-061-2/+5
| | | | | | | | | | | | jquery-rails [ci skip]
* | | Adding an documentation example and a test to button_to with pathAttila Domokos2014-02-022-0/+12
| | | | | | | | | I did not see in the docs that `button_to` supports not only URLs but paths as well. I documented this functionality with a unit tests and added an example to the docs as well.
* | | just require the template resolverAaron Patterson2014-01-312-1/+1
| | | | | | | | | | | | | | | | | | LookupContext is eagerly loaded, and FallbackFileSystemResolver is referenced at the class level. Just require the resolver from the eagerly loaded class rather than jumping through autoload hoops
* | | only ask for the location filters onceAaron Patterson2014-01-311-2/+2
| | |
* | | Minor changelog improvements [ci skip]Carlos Antonio da Silva2014-01-311-1/+1
| | |
* | | tidy CHANGELOGs [ci skip]Yves Senn2014-01-301-8/+10
| | |
* | | Rails config for raise on missing translationsKassio Borges2014-01-274-4/+25
| | | | | | | | | | | | | | | Add a config to setup whether raise exception for missing translation or not.
* | | Merge pull request #13414 from britto/jb-fix-dependency-matchingRafael Mendonça França2014-01-163-29/+184
|\ \ \ | | | | | | | | Improve ERB dependency detection
| * | | Update changelogJoão Britto2014-01-091-0/+7
| | | |
| * | | Avoid scanning multiple render calls as a single match.João Britto2014-01-092-21/+45
| | | | | | | | | | | | | | | | Each chunk of text coming after `render` is now handled individually as a possible list of arguments.
| * | | Improve ERB dependency detection.João Britto2014-01-092-21/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation can't handle some special cases of oddly-formatted Ruby. Now we are able to detect them: * Multi-line arguments on the `render` call * Strings containing quotes, e.g. `"something's wrong"` * Multiple kinds of identifiers - instance variables, class variables and globals * Method chains as arguments for the `render` call Also, this fix reduces the rate of "false positives" which showed up when we had calls/access to identifiers containing `render`, like `surrender` and `rendering`.
* | | | "serie" => "series"Waynn Lue2014-01-131-2/+2
| | | |