Matt Campbell
44c5813502
[skip ci] Fix typo in link_to :method option description
2014-02-24 14:17:18 -05:00
Yves Senn
947b3cbaa2
refactor, with_locale is not needed because I18n is mocked.
...
This is a follow up to #14170 . While backporting I recognized
that this call is not needed at all.
2014-02-24 19:31:23 +01:00
Vladimir Krylov
2cbc8c40b4
Fix ActionView label translation for more than 10 nested elements
2014-02-24 17:06:57 +02:00
Yves Senn
3007c297d3
refactor, extract with_locale
helper.
2014-02-24 10:28:48 +01:00
Yves Senn
c554d170e6
update version to 4.2.0.alpha
2014-02-23 13:14:43 +01:00
Rafael Mendonça França
33cb47ee48
Use the reference for the mime type to get the format
...
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
2014-02-18 16:12:51 -03:00
Rafael Mendonça França
1879c259b8
Merge branch '4-1-0-beta2'
...
Conflicts:
actionview/CHANGELOG.md
activerecord/CHANGELOG.md
2014-02-18 16:00:47 -03:00
Rafael Mendonça França
8b20c72dd8
Preparing for 4.1.0.beta2 release
2014-02-18 15:45:20 -03:00
Rafael Mendonça França
08d0a11a3f
Escape format, negative_format and units options of number helpers
...
Previously the values of these options were trusted leading to
potential XSS vulnerabilities.
Fixes: CVE-2014-0081
2014-02-18 15:38:50 -03:00
Prem Sichanugrist
3047376870
Add #no_content_type
attribute to AD::Response
...
Setting this attribute to `true` will remove the content type header
from the request. This is use in `render :body` feature.
2014-02-18 12:11:41 -05:00
Prem Sichanugrist
9fe506e394
Add missing CHANGELOG entry to Action View
2014-02-18 12:11:41 -05:00
Prem Sichanugrist
243e6e4b2a
Fix a fragile test on action_view/render
...
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.
2014-02-18 12:08:36 -05:00
Prem Sichanugrist
920f3ba266
Introduce render :html
for render HTML string
...
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.
2014-02-18 12:08:36 -05:00
Prem Sichanugrist
8cd9f6d205
Introduce render :plain
for render plain text
...
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.
2014-02-18 12:08:36 -05:00
Prem Sichanugrist
103e18c87d
Introduce render :body
for render raw content
...
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.
2014-02-18 12:08:36 -05:00
Xavier Noria
5f295aebdb
implements new option :month_format_string for date select helpers [ Closes #13618 ]
2014-02-15 10:27:15 +01:00
Lukasz Strzalkowski
f9b6b865e6
Variant negotiation
...
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
2014-02-13 16:22:56 +01:00
Iain Beeston
5b793a8add
Added tests to render helper that expect render partial: @foo
to
...
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).
2014-02-12 17:40:52 +00:00
Yves Senn
28abd967fc
Merge pull request #11770 from timruffles/doc_ajax_xhr
...
be more specific about csrf token and ajax - not whitelisted outside of jquery-rails [ci skip]
2014-02-03 08:38:44 -08:00
Attila Domokos
4b4db54e6b
Adding an documentation example and a test to button_to with path
...
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.
2014-02-02 10:27:18 -06:00
Aaron Patterson
3fbff7811b
just require the template resolver
...
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
2014-01-31 12:05:50 -08:00
Aaron Patterson
e8fcd599ba
only ask for the location filters once
2014-01-31 12:00:54 -08:00
Carlos Antonio da Silva
8c7e8b4f18
Minor changelog improvements [ci skip]
2014-01-31 08:02:56 -02:00
Yves Senn
02f9f33142
tidy CHANGELOGs [ci skip]
2014-01-30 11:12:46 +01:00
Kassio Borges
433628a45c
Rails config for raise on missing translations
...
Add a config to setup whether raise exception for missing translation or
not.
2014-01-27 08:03:46 -02:00
Rafael Mendonça França
662f8de06f
Merge pull request #13414 from britto/jb-fix-dependency-matching
...
Improve ERB dependency detection
2014-01-16 13:38:12 -08:00
Waynn Lue
fd68adc8a9
"serie" => "series"
2014-01-13 14:23:58 -08:00
Gaurish Sharma
35e56f6fa5
standardize on jruby_skip & rbx_skip
...
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
2014-01-13 19:51:47 +05:30
João Britto
e987dcd78f
Update changelog
2014-01-09 20:47:14 -02:00
João Britto
ccbba3ff50
Avoid scanning multiple render calls as a single match.
...
Each chunk of text coming after `render` is now handled individually as a possible list of arguments.
2014-01-09 20:37:00 -02:00
João Britto
c2afa05561
Improve ERB dependency detection.
...
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`.
2014-01-09 20:36:59 -02:00
Adrien
98c3586415
Fix typo in image_tag documentation
...
image_tag only supports :alt and :size as additional keys, not three.
2014-01-07 12:38:24 +01:00
Washington Luiz
a5d92e6a1d
Require actionview/version
...
just like all the other modules do require their version file
2014-01-06 02:52:46 -03:00
Gaelian Ditchburn
7a085dac2a
Switched to use display:none
in extra_tags_for_form method.
...
The use of `display:inline` with the content_tag call in the
extra_tags_for_form method potentially causes display issues with some
browsers, namely Internet Explorer. IE's behaviour of not collapsing
the line height on divs with ostensibly no content means that the
automatically added div containing the hidden authenticity_token, utf8
and _method form input tags may interfere with other visible form
elements in certain circumstances. The use of `display:none` rather
than `display:inline` fixes this problem.
Fixes #6403
2014-01-05 17:16:22 +00:00
Kuldeep Aggarwal
e9bfeb0c79
provide correct example of datetime_select
helper [ci skip]
2014-01-04 23:59:20 +05:30
Konstantin Wlasow
9882ec4a50
Fixed documentation. [ci skip]
2014-01-04 16:18:16 +06:00
T.J. Schuck
72bb3fc297
Change all "can not"s to the correct "cannot".
2014-01-03 17:02:31 -05:00
Rafael Mendonça França
f89266ace8
No need to use fixed size font [ci skip]
2014-01-03 16:42:30 -02:00
Prathamesh Sonpatki
2126c24af6
Fix documentation for end_year option of date_helper [ci skip]
...
- While editing an existing record, end_year is equal to current selected year plus 5 by default.
- While editing an existing record, start_year is equal to current selected year value minus 5 by default.
- Fixes #13552
Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
2014-01-03 21:46:21 +05:30
Kuldeep Aggarwal
ed62584391
provide correct information [ci skip]
2014-01-02 19:28:28 +05:30
Vipul A M
98cb3e69af
update copyright notices to 2014. [ci skip]
2014-01-01 23:59:49 +05:30
Akira Matsuda
f57e5f224b
Unused class in AV test
2013-12-25 10:33:42 +09:00
Akira Matsuda
222f00b422
Unused classes in AV tests
2013-12-24 11:04:49 +09:00
Robin Dupret
2bc88d4f74
Add a changelog entry for #13363 [ci skip]
2013-12-21 14:03:14 +01:00
Vijay Dev
a3b1105ada
Merge branch 'master' of github.com:lifo/docrails
2013-12-20 00:10:30 +05:30
Carlos Antonio da Silva
c5b76b5362
Prefer assert_raise instead of flunk + rescue to test for exceptions
...
Change most tests to make use of assert_raise returning the raised
exception rather than relying on a combination of flunk + rescue to
check for exception types/messages.
2013-12-19 09:20:51 -02:00
abhishek
21f0c580f3
duplication removed(DRY)
2013-12-18 16:17:11 +05:30
Guillermo Iguaran
76f8d31046
Merge pull request #13363 from kuldeepaggarwal/f-video-options
...
allow video_tag to accept `size` as `Number` for square shaped videos
2013-12-17 23:42:05 -08:00
Kuldeep Aggarwal
cd58745a7d
allow video_tag to accept size
as Number
for square shaped videos
2013-12-18 12:24:08 +05:30
David Heinemeier Hansson
c0a2d474c5
Get ready to release 4.1.0.beta1
2013-12-17 16:05:28 -08:00
Jeremy Kemper
cf56dcf930
Fix integration test to pass same-origin verification
2013-12-17 15:04:59 -07:00
Carlos Antonio da Silva
6802196a6b
Disable available locales checks to avoid warnings running the tests
2013-12-17 09:05:41 -02:00
Rafael Mendonça França
b34352e425
Merge pull request #13255 from strzalek/bump-builder
...
Bump up builder
2013-12-12 12:22:21 -08:00
Łukasz Strzałkowski
9f506c494b
More liberal builder dependency
...
Allowing us to get 3.2.x versions if needed.
2013-12-12 20:03:02 +01:00
Godfrey Chan
ebfd97124d
Merge pull request #13284 from aayushkhandelwal11/typos_corrected
...
s/everytime/every time/
2013-12-11 22:13:04 -08:00
Aayush khandelwal
4a9e54ef35
typos rectified [ci skip]
2013-12-12 11:29:23 +05:30
Waynn Lue
93de7ff856
test description uses "disable" when it should be "disabled"
2013-12-11 15:08:53 -08:00
Waynn Lue
b6251d626e
value is "disabled" not "disable"
2013-12-11 14:30:41 -08:00
Semyon Perepelitsa
1cd965000b
Fix typo in docs, missing colon in Symbol literal [ci skip]
2013-12-11 03:03:49 +08:00
Rafael Mendonça França
a220b1518d
Merge pull request #13059 from imkmf/cycle-accepts-array
...
Cycle object should accept an array
Conflicts:
actionview/CHANGELOG.md
2013-12-06 17:05:59 -02:00
Kristian Freeman
1eaa521273
A Cycle object should accept an array and cycle through it as it would
...
with a set of comma-separated objects.
2013-12-06 10:57:37 -08:00
Andriel Nuernberg
ec19c77ca5
Label only accepts :index
and :namespace
attributes from the input
2013-12-05 20:27:38 -02:00
Rafael Mendonça França
fe13e71162
Remove the explicit order set for the initializer
...
This will fix the regression added on
b068e20b35797aa6deaa377a48c990759734f515.
See tests added at ff08d31 to a better understanding about the problem
2013-12-05 16:37:10 -02:00
Jeremy Kemper
5086c8c211
Merge pull request #13189 from strzalek/retain-ap-av-dep
...
Retain ActionPack dependency on ActionView. Fixes #12979 .
2013-12-05 07:25:17 -08:00
Shota Fukumori (sora_h)
c1d5477b63
Escalate missing error when :raise is true
...
Before ec16ba75a5493b9da972eea08bae630eba35b62f,
ActionView::Helpers::TranslationHelper#translate has raised errors with
specifying options[:raise] to true.
This should work by this fix:
begin
t(:"translations.missing", raise: true)
rescue I18n::MissingTranslationData
p :hello!
end
2013-12-05 09:20:58 +09:00
Łukasz Strzałkowski
e064658d64
Include AV::Layouts directly in AM::Base
...
No need to do this in railtie as AM depends on AV either way
2013-12-05 01:03:03 +01:00
Łukasz Strzałkowski
d8888b94b3
Retain ActionPack dependency on ActionView
2013-12-05 01:02:46 +01:00
Godfrey Chan
2c564cdbdb
Added \u2028 \u2029 to json_escape
2013-12-04 09:43:42 -08:00
Godfrey Chan
c229c7a39c
Use lower case letters in unicodes sequences to match the new encoder's output
2013-12-04 09:27:55 -08:00
Godfrey Chan
2f1c5789c1
Fixed a long-standing bug in json_escape
that strips quotation marks
2013-12-04 09:27:54 -08:00
Godfrey Chan
039f9b37b9
Added failing test for json_escape striping quotation marks
...
Expanded test coverage for html_escape and json_escape
2013-12-04 09:26:14 -08:00
Mario Visic
a156562762
Fix issue where TextHelper#simple_format was calling missing 'raw' method
2013-12-05 00:21:55 +11:00
Rafael Mendonça França
d261c5cc28
Fix documentation of number_to_currency helper
...
Now users have to explicit mark the unit as safe if they trust it.
Closes #13161
Conflicts:
actionpack/lib/action_view/helpers/number_helper.rb
actionpack/test/template/number_helper_i18n_test.rb
2013-12-04 10:27:14 -02:00
Łukasz Strzałkowski
2d3a6a0cb8
Action Pack Variants
...
By default, variants in the templates will be picked up if a variant is set
and there's a match. The format will be:
app/views/projects/show.html.erb
app/views/projects/show.html+tablet.erb
app/views/projects/show.html+phone.erb
If request.variant = :tablet is set, we'll automatically be rendering the
html+tablet template.
In the controller, we can also tailer to the variants with this syntax:
class ProjectsController < ActionController::Base
def show
respond_to do |format|
format.html do |html|
@stars = @project.stars
html.tablet { @notifications = @project.notifications }
html.phone { @chat_heads = @project.chat_heads }
end
format.js
format.atom
end
end
end
The variant itself is nil by default, but can be set in before filters, like
so:
class ApplicationController < ActionController::Base
before_action do
if request.user_agent =~ /iPad/
request.variant = :tablet
end
end
end
This is modeled loosely on custom mime types, but it's specifically not
intended to be used together. If you're going to make a custom mime type,
you don't need a variant. Variants are for variations on a single mime
types.
2013-12-04 00:13:16 +01:00
Aaron Patterson
4d648819c5
optimize string literals in erb templates
2013-12-03 14:56:14 -08:00
Rafael Mendonça França
da633f81eb
Remove the escaping skip
...
We are generating safe strings in the paragraph, so we can escape the
tags
2013-12-03 17:26:49 -02:00
Lauro Caetano
b1b9a0aeca
Typos. return -> returns. [ci skip]
2013-12-03 13:31:36 -02:00
Michael Koziarski
0c7ac34aed
Stop using i18n's built in HTML error handling.
...
i18n doesn't depend on active support which means it can't use our html_safe
code to do its escaping when generating the spans. Rather than try to sanitize
the output from i18n, just revert to our old behaviour of rescuing the error
and constructing the tag ourselves.
Fixes: CVE-2013-4491
2013-12-02 16:42:16 -08:00
Michael Koziarski
bea9c9b4c0
Ensure simple_format escapes its html attributes
...
The previous behavior equated the sanitize option for simple_format with the
escape option of content_tag, however these are two distinct concepts.
This fixes CVE-2013-6416
Conflicts:
actionview/lib/action_view/helpers/text_helper.rb
2013-12-02 16:42:07 -08:00
Michael Koziarski
b31a7a6f1e
Escape the unit value provided to number_to_currency
...
Previously the unit values were trusted leading to potential XSS vulnerabilities.
Fixes: CVE-2013-6415
2013-12-02 16:41:14 -08:00
Aaron Patterson
2e3c3a87d8
Only use valid mime type symbols as cache keys
...
CVE-2013-6414
2013-12-02 16:41:09 -08:00
Guillermo Iguaran
b40faf423c
Merge pull request #13138 from gsamokovarov/remove-cattr-requires
...
Remove deprecated cattr_* requires
2013-12-02 14:30:39 -08:00
Genadi Samokovarov
6329d9fa8b
Remove deprecated cattr_* requires
2013-12-03 00:28:15 +02:00
Rafael Mendonça França
83e4f33ea1
Make ActionView::Tags loading tread safe
2013-12-02 20:27:50 -02:00
Guillermo Iguaran
152edcc16b
activemodel isn't a runtime dependency for actionview
2013-12-02 15:41:16 -05:00
Xavier Noria
d362ee17db
Merge pull request #13117 from akshay-vishnoi/typo
...
Typo and grammatical fixes [ci skip]
2013-12-02 06:17:09 -08:00
Akshay Vishnoi
ef0f633c66
Typo and grammatical fixes [ci skip]
2013-12-02 19:35:02 +05:30
Yves Senn
543ccf740d
ActionView::MissingTemplate
for partials includes underscore.
...
Missing partial folder/_partial instead of folder/partial.
Closes #13002 .
2013-12-02 08:35:34 +01:00
Kuldeep Aggarwal
fff0309081
unnecessary checking of size
with second regex
if matched with first one
2013-11-27 15:51:47 +05:30
Akira Matsuda
93c74e1b4d
More typo fixes
2013-11-27 03:56:12 +09:00
Akira Matsuda
499b602c8e
Minor typo fixes
2013-11-27 02:27:38 +09:00
Carlos Antonio da Silva
b2c7d2345f
Revert "Merge pull request #13027 from akshay-vishnoi/f-refactor"
...
This reverts commit f4a5a9ea4d183f4102796215d4502c46dbe3e52b, reversing
changes made to 7ccb482181ee6c47c765406009018a15172812de.
Reason:
The logic is different, the first call to #option_value_selected? is for
the :selected option (the argument is the "selected" variable), the second
call is for the :disabled option (the argument is the "disabled" variable).
2013-11-25 09:32:32 -02:00
Akshay Vishnoi
0f2ef7b929
avoiding calling of #option_value_selected? two times
2013-11-25 15:36:27 +05:30
Rafael Mendonça França
4f28e54424
_implied_layout_name should be private
2013-11-19 22:55:19 -02:00
Rafael Mendonça França
5487f62741
Use the right indentation
2013-11-19 22:53:32 -02:00
Rafael Mendonça França
ed7e4932f4
Renderer#_render_template should be private
...
Closes #12831
2013-11-19 22:52:06 -02:00
Mac Martine
6251eb992f
Improve readability of sentence in partial-renderer docs [ci skip]
2013-11-19 15:46:00 -08:00
Shimpei Makimoto
1e848906c5
Use set_backtrace
instead of @backtrace
in ActionView error
2013-11-16 04:41:28 +09:00
Rafael Mendonça França
f6f4bed34d
Merge pull request #12853 from joshjordan/master
...
Allocate one less object using html_safe during content_tag construction
2013-11-15 09:45:14 -08:00
Andrey Ognevsky
d04c4fac3b
Take Hash with options inside Array in #url_for
2013-11-15 15:50:42 +04:00
Josh Jordan
ea6640d05d
Allocate one less object using html_safe during content_tag construction
2013-11-14 23:51:40 -05:00
David Heinemeier Hansson
07996ebc50
Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep".
...
This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.
2013-11-14 15:31:27 -08:00
Rafael Mendonça França
84961dc5df
Merge pull request #12889 from kuldeepaggarwal/speed_ups
...
Used Yield instead of block.call
2013-11-14 11:29:28 -08:00
Kuldeep Aggarwal
d3a1ce1cdc
Used Yield instead of block.call
2013-11-15 00:53:57 +05:30
Saulius Grigaliunas
07d99335b3
Fix syntax error in atom_feed example [ci skip]
...
Builder's #tag! takes either String or Symbol as the first parameter
2013-11-13 13:56:13 +02:00
Rafael Mendonça França
452d746006
Make the method name the first argument
...
This is the only argument that changes over the method calls so it is
better to it be the first one
2013-11-09 18:28:32 -02:00
Rafael Mendonça França
87d0bde03f
Drop one more string allocation
2013-11-09 18:28:32 -02:00
Carlos Antonio da Silva
5deec016fe
Improve changelogs formatting [ci skip]
2013-11-09 16:44:58 -02:00
Yves Senn
675304b478
Merge pull request #12760 from pseidemann/master
...
fix simple_format escapes own output when sanitize is set to true
2013-11-09 04:07:50 -08:00
Vipul A M
5c0b9026ef
Extract common code from number helpers to new delegator method.
2013-11-09 07:38:30 +05:30
pseidemann
881a2cc907
fix simple_format escapes own output when sanitize is set to true
2013-11-08 17:13:59 +01:00
Arun Agrawal
daf226abc8
sub! can return nil
...
Revert "drop one more string allocation"
This reverts commit 4d15661d6c46c86a62ee1fc358f4b3ef9dd9f2ea.
2013-11-07 20:08:32 +01:00
Aaron Patterson
4d15661d6c
drop one more string allocation
2013-11-06 14:46:14 -08:00
Aaron Patterson
68b7e381f1
drop string allocations in the log subscriber
2013-11-06 14:37:30 -08:00
Rafael Mendonça França
256ae7dec5
Merge pull request #12788 from kylefritz/patch-1
...
rdoc: favicon source shouldn't begin with a slash to reference asset pipeline resource [ci skip]
Conflicts:
actionview/lib/action_view/helpers/asset_tag_helper.rb
2013-11-06 17:38:34 -02:00
Alex Johnson
01ef2c1943
Refactor File.expand_path usage to remove additional File.join
2013-11-05 10:50:03 +05:30
David Heinemeier Hansson
2b66f556ed
Line up the comments for aesthetics
2013-11-03 12:53:48 -08:00
Arun Agrawal
816126862e
Warnings removed for ruby trunk
...
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
2013-11-01 09:49:57 +01:00
Jérémy Lecour
cdf74eb5a0
Fix typo in the CHANGELOG
2013-10-31 15:29:16 +01:00
Carsten Zimmermann
805a6cc564
Convert CDATA input to string before gsub'ing
...
Rails 3.2 API allowed arbitrary input for cdata_section;
this change re-introduces the old behaviour.
2013-10-29 18:17:57 +01:00
Rafael Mendonça França
86f287e6cf
Remove warning of shadowing outer local variable
2013-10-27 20:18:08 -02:00
Vasiliy Ermolovich
106c988c10
add include_hidden option to collection_check_boxes helper
2013-10-27 18:31:19 +03:00
Rafael Mendonça França
a53f716706
Merge pull request #12636 from kongregate/dont_rescue_Exceptions
...
Avoid unnecessary catching of Exception instead of StandardError (conver...
2013-10-24 16:48:32 -07:00
stopdropandrew
54f485248c
Avoid unnecessary catching of Exception instead of StandardError (converting Exceptions into StandardErrors)
2013-10-24 16:43:27 -07:00
Rafael Mendonça França
6c570648ad
Merge pull request #10471 from andyw8/button_to_params
...
Add params option for button_to
Conflicts:
actionpack/CHANGELOG.md
2013-10-24 18:02:19 -02:00
Rafael Mendonça França
b2ea0ff572
Ensure the state is clean after one failure
2013-10-16 19:43:10 -03:00
Rafael Mendonça França
c44f8d255b
Merge pull request #12540 from wyaeld/bug/fix-recursive-digest
...
Ensure ActionView::Digestor.cache is correctly cleaned up
2013-10-16 19:41:16 -03:00
Adam Jahnke
065d3e061d
Fix typo in form_helper.rb
2013-10-16 16:09:09 -05:00
Brad Murray
0cdce7f910
add a new local variable to track if digests are being stored, to ensure the cleanup works correctly
2013-10-17 09:00:37 +13:00
Brad Murray
af1dc7f08a
update digestor code based on review
2013-10-15 21:08:47 +13:00
Brad Murray
6c04cb2261
update changelog
2013-10-15 11:23:37 +13:00
Brad Murray
2b3a349123
Ensure ActionView::Digest.cache is correctly cleaned up when
...
ActionView::Resolver.caching = false.
2013-10-15 11:17:11 +13:00
Brad Murray
89969dd711
Add 2 tests, 1 of which fails, to isolate the digest_caching behaviour causing #12521
...
If config.action_view.cache_template_loading = false, most likely in a development
configuration if config.cache_classes = false &
config.action_controller.perform_caching = true.
config.action_view.cache_template_loading defaults to the value of config.cache_classes
2013-10-15 11:06:50 +13:00
Rafael Mendonça França
aa9101eb7e
Merge pull request #12491 from shamanime/patch-1
...
Fix wrong variable name used in the select_day method documentation
2013-10-13 10:13:03 -07:00
Vipul A M
78c176e2fa
Change map
to map!
to save extra array creation on new array
2013-10-13 20:58:50 +05:30
Jefferson Queiroz Venerando
97943f19b7
Fix wrong variable name used in the select_day method documentation
...
The variable name created in the example is `my_date`, the methods were using `my_time` instead.
2013-10-10 10:34:14 -03:00
Arun Agrawal
64eb39a5b9
Moved viewpathstest into actionview/test/actionpack/controller
...
These test were not running at all,
Now it will run as a tests part.
2013-10-09 20:09:33 +02:00
Arun Agrawal
32b42e2620
FakeController is not required in AV
2013-10-09 19:30:44 +02:00
Rafael Mendonça França
874ca68f3d
Merge pull request #12437 from websiteswithclass/master
...
Fixed typo in documentation
2013-10-04 06:40:01 -07:00
Arun Agrawal
e9bce34ddf
Directory name in RUNNING_UNIT_TESTS.rdoc [ci skip]
2013-10-04 08:31:29 +02:00
Joseph Zidell
bf495069cb
Fixed return strings in documentation
2013-10-03 18:30:42 -04:00
Joseph Zidell
58d64ddc46
Fixed typo in documentation
2013-10-03 16:57:18 -04:00
Arun Agrawal
9a16872aee
Running all isolated test for actionview
...
1. fix name for activerecord directory
2. Added actionpack directory to run tests
2013-10-03 00:00:50 +02:00
Thomas von Deyen
1825f6fb60
Adds template dependencies rake task from cache_digests gem.
...
This adds the rake tasks `cache_digests:dependencies` and `cache_digests:nested_dependencies` from `cache_digests` gem.
2013-09-26 21:19:19 +02:00
Rafael Mendonça França
0cc4ff77cc
Add CHANGELOG entry for #12344
...
[ci skip]
2013-09-24 21:07:24 -03:00
Angel N. Sciortino
8ae8044726
Use the given name in html_options for the hidden field in collection_check_boxes
2013-09-24 13:42:06 -05:00
Rafael Mendonça França
dd13722c26
Merge pull request #10773 from wangjohn/link_and_routing_options
...
Adding documentation and tests to ``polymorphic_url`` and ``link_to``
2013-09-23 12:13:15 -03:00
Bogdan Gusiev
e8e08d69c2
Fix some edge cases for AV select
helper with :selected
option
2013-09-23 17:48:23 +03:00
Rafael Mendonça França
1c6bcefe7e
Expand select documentation to tell about the block
...
[ci skip]
2013-09-23 11:19:35 -03:00
Rafael Mendonça França
0e9f0bd6f7
Use ERB in the CHANGELOG [ci skip]
2013-09-23 11:11:26 -03:00
Bogdan Gusiev
57bf92c6de
Ability to pass block to AV#select helper
...
Example:
= select(report, "campaign_ids") do
- available_campaigns.each do |c|
%option{:data => {:tags => c.tags.to_json}, :value => c.id}= c.name
2013-09-23 14:25:42 +03:00
Vasiliy Ermolovich
0b0ac5d917
handle :namespace
form option in collection labels
2013-09-22 21:49:01 +03:00
Santiago Pastorino
32e23884cc
Merge pull request #12232 from claudiob/delete-unused-helper-fixtures
...
Remove unused AV helper fixtures from e10a2531
2013-09-20 18:55:08 -07:00
Daniel Schierbeck
77e79ecd92
Bust the template digest cache key when details are changed
...
Since the lookup details will influence which template is resolved, they
need to be included in the cache key -- otherwise two different
templates may erroneously share the same digest value.
2013-09-19 10:25:14 +02:00
Andy Waite
e6e0579def
Add params option for button_to
...
The parameters are rendered as hidden form fields within the generated
form. This is useful for when a record has multiple buttons associated
with it, each of which target the same controller method, but which
need to submit different attributes.
2013-09-18 19:56:46 +01:00
Santiago Pastorino
949c4291a4
There's no need to do this
...
AS does the following inside Time.find_zone! ...
`ActiveSupport::TimeZone[time_zone] || TZInfo::Timezone.get(time_zone)`
and given that the test is stubbing AS::TZ[] we don't need the removed
code.
2013-09-17 16:12:15 -03:00
claudiob
d6efc1edc1
Remove unused AV helper fixtures from e10a2531
...
Several fixtures for helpers are removed. They were introduced in
ActionView by @strzalek but never referenced in any test.
2013-09-14 10:30:17 -07:00
Waynn Lue
87fe7e9b16
"generates" applies to "collection radio" so it should be singular
...
I accidentally pushed this change to docrails before realizing that it's technically a code change, so I'm opening this pull request (and rolling back my change to docrails).
2013-09-12 14:48:57 -07:00
Rafael Mendonça França
495daef061
Merge pull request #12112 from adamniedzielski/fix-form-for-namespace-and-as
...
form_for - fix :namespace and :as options clash
Conflicts:
actionview/CHANGELOG.md
2013-09-12 18:20:14 -03:00
Rafael Mendonça França
4bdf929579
Write the right CHANGELOG entry for #11603
...
[ci skip]
2013-09-12 13:25:21 -03:00
Rafael Mendonça França
9c18beae64
Merge pull request #11603 from jetthoughts/join_strings_instead_of_contactination
...
Cleanup: replace String concatenation by joining for excerpt helper
2013-09-12 13:25:04 -03:00
Guillermo Iguaran
005b33222d
Merge pull request #12173 from arunagw/fixes_reverted_by_revert_commit
...
Revert fixes
2013-09-10 07:05:17 -07:00
claudiob
61d2391352
Remove helper fixtures not used in any test
...
The fixture for module AbcHelper defines three functions bare_a,
bare_b and bare_c, but only bare_a is used in the code that tests
helper functions.
2013-09-09 14:19:09 -07:00
José Valim
67336ce199
Remove remaining coupling with AV in MimeResponds
2013-09-09 12:33:53 -03:00
José Valim
a41669563b
Remove BasicRendering and remove template functionality from AbsC::Rendering
2013-09-09 12:33:53 -03:00
Arun Agrawal
3dffe65d91
Back AV description in gemspec
2013-09-09 17:12:45 +02:00
Adam Niedzielski
e18f045b65
form_for - fix :namespace and :as options clash
...
:as option should not overwrite :namespace option when
generating html id attribute of the form element. id should be prefixed
by specified namespace even if :as option is present
Add test case showing the issue and code fixing it
2013-09-09 07:59:07 +02:00
Paul Nikitochkin
061e48df26
Cleanup of excerpt helper
...
* replaced String concatenation by joining
* separator has default value to '', even it is nil
2013-09-06 18:00:55 +03:00
Carlos Antonio da Silva
b77781c012
Fix failure with minitest 5.0.7
...
Require minitest/mock in test where stub method is needed.
Apparently this was being "imported" by minitest pride plugin, which
previously required "minitest/autorun", that required "minitest/mock",
making the method available by chance.
It has been changed in minitest:
595ce955c0
So we need to make sure we require what we really need where necessary.
2013-09-06 09:29:00 -03:00
Carlos Antonio da Silva
3b35103793
Merge pull request #12143 from rajcybage/fixing_typos
...
fix actionview and activemodel test cases typos
2013-09-05 03:32:56 -07:00
Rajarshi Das
e21a18bed0
fix actionview and activemodel test cases typos
2013-09-05 14:21:57 +05:30
Vipul A M
bb69f1df8b
Fix method name typos
2013-09-05 10:43:57 +05:30
namusyaka
2b6b5404af
Fix a few typos. [ci skip]
2013-09-04 03:48:53 +09:00
Łukasz Strzałkowski
aea02eb430
Move skeleton methods from AV to AbsC
...
The methods:
* #render_to_body
* #render_to_string
* #_normalize_render
Haven't had anything specyfic to ActionView. This was common code which should belong to AbstractController
2013-09-03 14:57:37 +02:00
Łukasz Strzałkowski
544d0fad3d
Return to using protected_instance_variables in AV
2013-09-02 23:18:02 +02:00
Rajarshi Das
414f496363
fix the typo [ci skip]
...
fix the typo newstopics => new topics in action view cache helper
2013-09-02 10:41:55 +05:30
Rafael Mendonça França
974335d4d0
Improve CHANGELOG entry [ci skip]
2013-08-27 14:10:45 -03:00
Rafael Mendonça França
d6854dfe13
Merge pull request #11768 from cloudspace/cache_template_loading
...
Only cache template digests if !config.cache_template_loading
2013-08-27 10:05:01 -07:00
Łukasz Strzałkowski
e10a25310f
Move abstract's controller tests to AV
...
The ones that were actually testing AV functionality and should belong in there
2013-08-25 11:40:11 +02:00
Łukasz Strzałkowski
7620ab08be
Move actionpack's controller tests
2013-08-25 11:40:10 +02:00
Łukasz Strzałkowski
c40c362ec1
Load HTML in ActionView not ActionPack
...
HTML Scanner is part of ActionView and it should be loaded along with it
2013-08-25 11:40:10 +02:00
Łukasz Strzałkowski
1e001b1db3
Move AP's capture tests to AV
2013-08-25 11:39:14 +02:00
Łukasz Strzałkowski
c9ef9c1442
Move remaining layouts tests to AV
2013-08-25 11:39:14 +02:00
Łukasz Strzałkowski
53e65e1772
Add AP tests to runner
2013-08-25 11:39:14 +02:00
Łukasz Strzałkowski
969b22f189
Cleanup & reorganise rake tasks in AV
2013-08-25 11:39:14 +02:00
Łukasz Strzałkowski
b5410a73ec
Split rendering tests between AP & AV
...
All rendering test remain in AV. Head, ETag etc. test stay in AP
2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
acc8e25902
Move render_test to AV
2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
aa2d003812
Fist stab on basic rendering
2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
7d810049fe
Add #rendered_format method to controllers
2013-08-25 11:39:13 +02:00
Łukasz Strzałkowski
3f2ac795b8
Add missing requires inside AV
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
6c7d895dda
Do not load AV inside AP
...
Move that part to AV railtie
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
7c8817aeef
Add missing require
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
839938e3de
Revert "Move setting content_type to AV"
...
This reverts commit f4d602aff6cec80304b131ecfcc2676d0304f0cc.
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
cb2d671cb8
Move setting content_type to AV
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
0b4507a26f
Use concat to avoid allocating additional array
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
98ec4ebfe7
Pass args to render's super method
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
1656f58f07
Improve AV::Rendering docs
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
b068e20b35
Include AV::Layouts before setting view_paths
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
d1760253f5
Load AV::Layout to AM::Base in railties
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
43ce8265a1
Don not require AC::Caching
2013-08-25 11:39:10 +02:00