Xavier Noria
06bdaae071
removes ActionView::Helpers::ScriptaculousHelper
2011-04-13 13:24:31 +02:00
Xavier Noria
3223e04a21
removes support for RJS in button_to_function
2011-04-13 13:23:16 +02:00
Xavier Noria
8449da929e
removes support for RJS in link_to_function
2011-04-13 13:23:16 +02:00
Matt Duncan
93def19063
Fixing distance_of_time_in_words range near 2 days
2011-04-13 16:14:52 +08:00
Joshua Peek
ed24595647
Merge branch 'master' into sprockets
2011-04-12 21:56:00 -05:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Aaron Patterson
2e757bc298
do not return html safe strings from auto_link
2011-04-05 16:22:53 -07:00
Joshua Peek
56a5da89db
Merge branch 'master' into sprockets
...
Conflicts:
railties/lib/rails/application/configuration.rb
2011-03-30 21:04:33 -05:00
Joshua Peek
77d8f7a4b7
Seperate asset directories
2011-03-29 21:40:24 -05:00
Joshua Peek
1af295fc9a
Tests for SprocketsHelper
2011-03-29 15:42:31 -05:00
Sebastian Martinez
52351bcfeb
Remove 'warning: ambiguous first argument' when running ActionPack tests
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-29 10:23:10 -03:00
David Heinemeier Hansson
cc6fa2f4d7
Fix alias_method, add test
2011-03-27 11:20:54 -07:00
David Heinemeier Hansson
f8a05ad297
Allow FormHelper#form_for to specify the :method as a direct option instead of through the :html hash [DHH]
2011-03-26 14:45:00 -07:00
Aaron Patterson
55bf087da1
SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test
2011-03-21 10:00:30 -07:00
Chris Kowalik
de1fe5e8a7
[action_view] added custom patterns to template resolver
2011-03-20 07:01:46 +08:00
Josh Kalderimis
0eae625256
fixes an issue with number_to_human when converting values which are less than 1 but greater than -1 [ #6576 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-16 15:11:00 -03:00
Diego Carrion
dff73dec22
added failing test for fields_for with a record object that inherits from Hash
...
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-03-06 05:18:56 +00:00
R.T. Lechow
87e9e3f9af
Action Pack typos.
2011-03-05 11:56:35 +01:00
Alexander Uvarov
0db915efd1
Add an option to FormBuilder to omit hidden field with id
...
[#4551 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-04 16:38:08 -02:00
Aaron Patterson
54fdd33f33
use a subclass of AS::TZ for testing html output
2011-02-28 16:30:14 -08:00
Josh Kalderimis
0f8d2794f2
updated Time, Date and DateTime current methods in AS to use Time.zone and not Time.zone_default.
...
[#6410 state:committed]
2011-02-28 14:05:49 -08:00
Santiago Pastorino
53b17e9ad0
javascript_include_tag shouldn't raise if you register an expansion key with nil value
2011-02-28 11:52:00 -02:00
Santiago Pastorino
801e314006
Add tests for register expansion methods with key = []
2011-02-28 11:30:12 -02:00
Josh Kalderimis
33cc36678b
Allow for the format of time_tag in AP to be changed via an option argument.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-12 22:22:30 -02:00
Sjoerd Andringa
95a5bd87cb
Added time_tag helper to AP for HTML5 time tag [ #5919 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-12 22:22:18 -02:00
Josh Kalderimis
e2b99eb1a7
Applied changes to stylesheet_link_tag from javascript_include_tag which corrects issues with ordering and duplicates.
2011-02-13 05:50:25 +08:00
Josh Kalderimis
1363bb8f72
This corrects two issues with javascript_include_tag, the order at which they are expanded, and removing duplicates.
...
When individual js assets are specified, they will override the order of the same asset specified in an expansion.
[#5938 state:resolved]
2011-02-13 05:50:24 +08:00
Carlos Antonio da Silva
ad5b4d980a
Remove duplicated action pack tests added to fix issue with fields_for, nested attributes and erb
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-12 16:40:41 -02:00
Tom Stuart
829de9d98e
Add block support to button_tag helper
...
As per the HTML 4.01 spec:
Buttons created with the BUTTON element function just like buttons
created with the INPUT element, but they offer richer rendering
possibilities: the BUTTON element may have content. For example, a
BUTTON element that contains an image functions like and may resemble
an INPUT element whose type is set to "image", but the BUTTON element
type allows content.
Since rich content is the main purpose of the <button> element, it makes
sense for the button_tag helper to accept a block.
http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON
http://dev.w3.org/html5/spec/the-button-element.html#the-button-element
Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com>
2011-02-12 13:52:00 -02:00
Tom Stuart
03749d6c88
Make type="submit" the default for button_tag helper
...
"submit" is the default value of the <button> element's type attribute
according to the HTML 4.01 and the HTML5 draft specs, so if button_tag
is going to have a default, type="submit" is a more sensible choice than
type="button".
http://www.w3.org/TR/html401/interact/forms.html#adef-type-BUTTON
http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type
Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com>
2011-02-12 13:51:02 -02:00
Josh Kalderimis
1814298d75
Removed Array#safe_join in AS core_ext and moved it to a view helper with the same same. This also changes how safe_join works, if items or the separator are not html_safe they are html_escape'd, a html_safe string is always returned.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-02-10 16:51:30 +01:00
José Valim
89a5f1463d
Revert "Removed Array#safe_join in AS core_ext and moved it to a view helper with the same same."
...
Applied the wrong version.
This reverts commit 98c0c5db50a7679b3d58769ac22cb0a27a62c930.
2011-02-10 16:50:35 +01:00
Josh Kalderimis
98c0c5db50
Removed Array#safe_join in AS core_ext and moved it to a view helper with the same same.
2011-02-10 23:47:54 +08:00
José Valim
6b1018526f
Use Mime::Type references.
2011-02-08 14:14:26 -08:00
Michael Koziarski
3ddd7f7ec9
Be sure to javascript_escape the email address to prevent apostrophes inadvertently causing javascript errors.
...
This fixes CVE-2011-0446
2011-02-08 13:56:08 -08:00
Carlos Antonio da Silva
631e23ec6c
Add tests showing the LH issue #6381 : fields_for with inline blocks and nested attributes already persisted
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-08 18:04:12 -02:00
Franco Brusatti
d3cfee1182
removing generation of id in submit helper
...
[#6369 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 20:24:14 -02:00
Anton Astashov
c1c6f29214
Add a test for 'render :layout'
...
To make sure it will show block contents if it is placed after 'render
:partial'
[#5557 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 12:55:32 -02:00
Santiago Pastorino
86dc5987b2
add test to check class is being escaped in form_class
2011-02-01 19:17:31 -02:00
Andrei Bocan
15ad707852
Allow customization of form class for button_to
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 19:09:00 -02:00
Akira Matsuda
cb9fa52832
auto_link: avoid recognizing full width chars as a part of URI scheme
...
fixes regression by 133ada6ab0
[#5503 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 14:04:42 -02:00
Akira Matsuda
5dd803e9b1
Accept String value for render_partial :as option
...
[#6222 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 13:01:54 -02:00
José Valim
262b2ea8cd
Solve SystemStackError when changing locale inside ActionMailer [ #5329 state:resolved]
2011-01-19 23:42:10 +01:00
Aaron Patterson
54de7048a5
Merge branch 'template_error' into merge
...
* template_error:
Ensure original exception message is present in both Template::Error#message and Template::Error#inspect.
ActiveSupport::Deprecation.silence no longer needed.
2011-01-18 10:52:37 -08:00
Aaron Patterson
1333020448
fixing space errors
2011-01-17 14:45:24 -08:00
Santiago Pastorino
1de47a0d56
button_tag should escape it content
2011-01-12 22:05:52 -02:00
Santiago Pastorino
6062d434f1
Allow view in AV::TestCase to access it's controller helpers methods
2011-01-12 12:14:00 -02:00
John Allison
5d1d9bfb05
Improve select helpers by allowing a selected value of false. This is useful when using a select helper with a boolean attribute, and the attribute is false. (e.g. f.select :allow_comments)
2011-01-09 15:45:55 -08:00
Rizwan Reza
18605adec3
HTML5 button_tag helper
...
This tag is similar in nature to submit_tag, but allows more control.
It also doesn't submit if submit type isn't used, allowing JavaScript to
control the flow where required.
For more information: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-button-element
2011-01-09 15:22:23 -08:00