Commit Graph

446 Commits

Author SHA1 Message Date
Aditya Kapoor
9505a21f42 [ci skip] Fix doc for javascript_helper 2014-06-11 01:29:17 +05:30
Akshay Vishnoi
294ddff512 [ci skip] Add Docs for strip_insignificant_zeros option in number helpers 2014-06-10 23:07:49 +05:30
Akshay Vishnoi
9bb0f1e08a [ci skip] Correct output and use valid options of number helpers 2014-06-10 22:16:13 +05:30
Jiri Pospisil
f62ec6cb2d Fix cache_digest rake tasks
Bring cache_digests:* rake tasks up-to-date with the API changes introduced in
637bb726cac60aaa1f7e482836458aa73e17fbb7
2014-06-10 13:52:36 +02:00
Arthur Nogueira Neves
a6c8cde835 Merge pull request #15542 from Gaurav2728/gaurav-remove_shutdown_link
remove rubyforge.org that was shut down [ci skip]
2014-06-06 19:50:54 -05:00
Matthew Draper
fadbc7c9ee Unwrap another html_escape
/cc @tenderlove
2014-06-07 10:13:00 +09:30
Aaron Patterson
17fc6f16eb eliminate more wasteful allocations 2014-06-06 15:29:03 -07:00
Gaurav Sharma
19ef270923 remove rubyforge.org that was shut down [ci skip] 2014-06-06 22:26:56 +05:30
Aaron Patterson
805c31dc43 Merge pull request #15513 from zenspider/remove_flush_output_buffer
Removed CaptureHelper#flush_output_buffer as it is only used in tests.
2014-06-05 10:05:53 -07:00
Greg Molnar
fd6df516a0 document include_blank's usage with a string [ci skip] 2014-06-05 13:53:39 +01:00
Ryan Davis
479c7cacd5 Removed CaptureHelper#flush_output_buffer as it is only used in tests.
reviewed: @tenderlove
2014-06-04 16:30:36 -07:00
Rafael Mendonça França
31737e0461 Revert "Correct Documentation for asset_tag_helpers"
This reverts commit c22a253d1a72602331db1eba3e91bc945eff2346.

Reason: Our documentation assumes the assets are in the proper place and
we are using the default Rails stack.

With the default Rails stack and the assets being in the correct place
the assets helpers uses the `/assets` prefix.
2014-06-04 17:12:01 -03:00
Aaron Patterson
e2a97adbae call capture fewer times from form_for 2014-06-02 16:43:47 -07:00
Aaron Patterson
8899503f62 drastically reduce object allocations
before this change, we were allocating AS::SafeBuffer objects that were
being interpolated in to a string, so the safe buffer object was being
thrown away.  This change only allocates a string (vs a string *and* a
safebuffer) and interpolates the string.

On my test application, this reduced the AS::SafeBuffer objects from
1527k per request to about 500 per request.
2014-06-02 16:12:18 -07:00
Rafael Mendonça França
f71265f7f8 Merge pull request #15379 from xuanxu/rational_precision
Fix AS::NumberHelper results with rationals
2014-06-02 13:56:22 -03:00
Zachary Scott
4c66ab2b21 Feature requests should be made on the mailing list, not submitted to
the issue tracker. See also #15455 [ci skip]
2014-06-01 19:11:39 -07:00
Aditya Kapoor
d7c06a3932 [ci skip] correct doc for ActionView::Helpers::DebugHelper 2014-05-31 23:44:34 +05:30
Juanjo Bazán
60062cf39a Fix AS::NumberHelper results with rationals
:precision was incorrectly being applied to Rationals

before:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.3"
after:
  ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
  => "3.33"
2014-05-31 20:07:47 +02:00
Manuel Meurer
f7b0f4f1e0 Update documentation for setting asset_host to a Proc, mention that the request parameter might not be supplied [ci skip] 2014-05-31 17:06:36 +02:00
Zachary Scott
4584be9b8b Update url to rake docs [ci skip] 2014-05-29 10:17:20 -07:00
Matthew Draper
29f8eae3fa Merge pull request #15061 from tgxworld/remove_unnecessary_include
Remove unnecessary include for integration tests.
2014-05-29 21:33:12 +09:30
簡煒航 (Jian Weihang)
7575f4b9d6 Fix documentation
To prevent `ArgumentError`, `config.action_view.sanitized_allowed_attributes` should be assigned by an array instead of a list.

```
/Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:98:in `do_with_enum': value must be enumerable (ArgumentError)
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:355:in `merge'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/actionview-4.1.1/lib/action_view/helpers/sanitize_helper.rb:211:in `sanitized_allowed_attributes='
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/actionview-4.1.1/lib/action_view/railtie.rb:26:in `block (3 levels) in <class:Railtie>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/actionview-4.1.1/lib/action_view/railtie.rb:25:in `each'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/actionview-4.1.1/lib/action_view/railtie.rb:25:in `block (2 levels) in <class:Railtie>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/actionview-4.1.1/lib/action_view/railtie.rb:24:in `block in <class:Railtie>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
	from /Users/tonytonyjan/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/config/environment.rb:5:in `<top (required)>'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/config.ru:3:in `require'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/config.ru:3:in `block in <main>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/config.ru:in `new'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/config.ru:in `<main>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/server.rb:50:in `app'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/server.rb:130:in `log_to_stdout'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/server.rb:67:in `start'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:81:in `block in server'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `tap'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `server'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/bin/rails:8:in `require'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/bin/rails:8:in `<top (required)>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
	from /Users/tonytonyjan/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/bin/spring:16:in `require'
	from /Users/tonytonyjan/Dropbox/home/codes/penta_ruby/bin/spring:16:in `<top (required)>'
	from bin/rails:3:in `load'
	from bin/rails:3:in `<main>'
```
2014-05-29 04:03:23 +08:00
Aditya Kapoor
5e36411ec3 correct docs for (asset|image)_path [ci skip] 2014-05-27 00:58:47 +05:30
Aditya Kapoor
6d8beaad1f correct doc for (audio|video)_tag [ci skip] 2014-05-27 00:21:30 +05:30
Aditya Kapoor
c22a253d1a Correct Documentation for asset_tag_helpers 2014-05-26 23:14:16 +05:30
Juanito Fatas
d28ed9f536 Convert source to string if it is present. 2014-05-25 16:18:51 +08:00
Gaurav Sharma
b4db241a6e documentation fix 2014-05-24 23:18:29 +05:30
Omar Ismail
e1cc42641e update docs to include html id for select_tag 2014-05-23 15:36:58 -04:00
Aaron Patterson
239f560630 Feature detect based on Ruby version.
I didn't want to do this, FNM_EXTGLOB is defined on 2.1.x, but Dir.glob
returns the wrong value on Ruby less than 2.2.0.  Checking for a
case-insensitive FS seems too hard, so just check Ruby version  Checking
for a case-insensitive FS seems too hard, so just check Ruby version.
2014-05-18 12:00:12 -07:00
Rafael Mendonça França
3acf28773b Merge pull request #15021 from hubertlepicki/allow_custom_host_in_asset_url
Allow custom asset host to be passed in asset_url
2014-05-16 13:31:20 -03:00
Yves Senn
8109dc8067 formatting pass through CHANGELOGS. [ci skip] 2014-05-16 09:03:26 +02:00
Rafael Mendonça França
7b50d7f249 We need an explicit return
If we don't return early Ruby will memoize the value of the prefix of
the parent class what will make the subsequent searchs to not work as
expected.

If the early return we are avoiding the memoization.

But when using the deprecated path we need to memoize the value, so we
are not using early return for the deprecated path.
2014-05-14 14:28:54 -03:00
Rafael Mendonça França
548cb1cf7b Following documentation guideline 2014-05-14 13:47:14 -03:00
Rafael Mendonça França
7bcd66e449 Refactoring the code to make consitional return explicit 2014-05-14 13:45:20 -03:00
Rafael Mendonça França
0af0ffde18 Follow the documentation guideline 2014-05-14 13:44:14 -03:00
Rafael Mendonça França
4fb63f7643 Mark _prefix as nodoc
These methods are private API.
2014-05-14 13:42:55 -03:00
Rafael Mendonça França
a0630eee4c ._prefix is private API so we should not recommend to override it 2014-05-14 13:41:20 -03:00
Rafael Mendonça França
05edaa660e Improve CHANGELOG entry 2014-05-14 13:40:54 -03:00
Rafael Mendonça França
51a52cb836 Merge remote-tracking branch 'apotonick/simplify-prefixes'
This is the rebased version of #15026

Closes #15026
2014-05-14 13:36:58 -03:00
azul
4fb2be5456 minor: point to the right test suite location 2014-05-14 09:24:31 +02:00
Carlos Antonio da Silva
c4c5801bd9 Fix assertion order and ✂️ extra spaces 2014-05-13 12:09:11 -03:00
Aaron Patterson
f0f7c4ff96 Merge pull request #15068 from josepjaume/patch-1
Dup options hash to prevent modifications
2014-05-13 08:04:24 -07:00
Josep Jaume Rey
6caf3ab51b Dup options hash to prevent modifications
`options[:default]` and `options[:raise]` can be mistakenly added to the `options` hash. This can be a problem if you're reusing the same object.
2014-05-13 14:13:36 +02:00
Aaron Patterson
84908bbde9 fix bad merge 2014-05-12 18:08:41 -07:00
Aaron Patterson
547881594b 😢🔫 use an empty hash for magical speed.
For some reason, if the hash is empty, we choose "optimized" routes.  I
am not sure how or why optimized routes differ from regular routes.
But, if we make sure the hash is empty, we get a nice speed improvement.
2014-05-12 16:16:06 -07:00
Aaron Patterson
cfdda38088 use the helper method builder to construct helper methods 2014-05-12 15:54:45 -07:00
Aaron Patterson
9656640080 probably should not check in a raise 2014-05-12 15:54:45 -07:00
Aaron Patterson
74a6ad2c6b undo optimized calls until the builder object is finished 2014-05-12 15:54:45 -07:00
Aaron Patterson
89e0718188 fix url_for with classes 2014-05-12 15:54:44 -07:00
Aaron Patterson
4b8ab797b4 break each polymorphic type to it's own method 2014-05-12 15:54:44 -07:00