Commit Graph

7094 Commits

Author SHA1 Message Date
Santiago Pastorino
2aefff8f76 config should always be an AS::InheritableOptions object. Closes #1992 2011-07-08 21:44:31 -03:00
Xavier Noria
7cef8ad32f backports f6a6b51 and ad912c0 2011-07-09 00:10:50 +02:00
José Valim
9370855d54 Move config.default_asset_host_protocol to the railtie. 2011-07-07 19:16:36 -03:00
José Valim
8d0f03923c Give higher priority to assets.cache_store. 2011-07-06 18:00:39 -07:00
José Valim
d8e2a1fd8a Make compressors lazily load. 2011-07-06 21:45:36 -03:00
José Valim
a05d59fe06 Deprecate stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
2011-07-06 20:33:01 -03:00
Sam Pohlenz
7f3e45c2ec Test for extractable_options? within nested fields_for.
This fixes an error when a record object that is a subclass of Hash is
passed to fields_for, which is incorrectly interpreted as field options.
2011-07-06 21:25:07 +09:30
Prem Sichanugrist
01c1a86566 Fix failing test on uninitialized Rails.config.assets.prefix
This was introduced in [2684f17a17] 💣
2011-07-03 15:58:33 +02:00
Sam Pohlenz
b494b5cf9d Add documentation for asset_prefix and asset_environment
(cherry picked from commit 21344bc33b)
2011-07-03 13:40:30 +09:30
Sam Pohlenz
add63ee220 Add tests for alternate asset prefix/environment
(cherry picked from commit 0613f3bcdb)
2011-07-03 13:40:19 +09:30
Sam Pohlenz
b8fa5f65a6 Refactor sprockets asset paths to allow for alternate asset environments 2011-07-03 13:40:01 +09:30
Damien Mathieu
827e8a5983 provide a more explicit message when using url_for with nil
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
2011-07-03 02:13:53 +02:00
José Valim
b6315d597b require 'thread' before using Mutex 2011-07-01 14:52:28 -07:00
Andrew White
7467df72a8 It's autoload all the way down
(cherry picked from commit 2d16515e52)
2011-07-01 21:45:08 +01:00
Andrew White
a8410a2ca5 Don't require ActionView::Context as it's autoloaded
(cherry picked from commit 79924c637d)
2011-07-01 20:38:03 +01:00
Andrew White
0155e10a73 Revert "Add missing require for ActionView::AssetPaths"
This reverts commit ad1d3db983.
2011-07-01 20:37:37 +01:00
Andrew White
1e56adacee Add missing requires for ActionView::Context and Module#instance_method_names
(cherry picked from commit fdaecbed84)
2011-07-01 20:20:16 +01:00
Andrew White
ad1d3db983 Add missing require for ActionView::AssetPaths
(cherry picked from commit 987eb7d423)
2011-07-01 20:19:53 +01:00
Ernie Miller
280b657e60 Require attr_internal before using in ActionView::Helpers
(cherry picked from commit 3a2ef52ad6)

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-07-01 20:19:06 +01:00
Bogdan Gusiev
337a446ab2 Fixed ActionView::FormOptionsHelper#select with :multiple => false
(cherry picked from commit 0fdac01876)

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-07-01 13:00:55 +01:00
José Valim
e495ad8ddd Make sure respond_with with :js tries to render a template in all cases 2011-06-30 11:48:01 -03:00
Santiago Pastorino
185ba01baf Bump up rack-cache and tzinfo 2011-06-30 10:09:52 -03:00
José Valim
cb307d1c4a Add has_key? and key? methods to CookieJar removed in 0ca69ca65f 2011-06-30 08:02:37 -03:00
Santiago Pastorino
a6d8fefd86 Move Coffee generators and templates to Coffee Railtie and create javascript_engine ("js") for apps that remove Coffee gem 2011-06-29 21:18:42 -03:00
Xavier Noria
dc921ffae3 sub suffices here 2011-06-29 23:47:28 +02:00
José Valim
fe6e890f63 [IMPORTANT] Make "sprockets/railtie" require explicit.
This makes "sprockets/railtie" explicit. This means that sprockets will
be loaded when you require "rails/all". If you are not using requiring
"rails/all", you need to manually load it with all other framework
railties.

In order to be complete, this commit also adds --skip-sprockets to
the rails generator.
2011-06-29 09:42:36 -03:00
Xavier Noria
3f759bfa7d the generated ALT attribute for images no longer contains the digest, if any 2011-06-27 23:00:52 +02:00
Chris Eppstein
4b8bd7a54f Merge remote-tracking branch 'rails/3-1-stable' into asset_urls
* rails/3-1-stable: (49 commits)
  Add JavaScript Runtime name to the Rails Info properties (thanks Sam Ruby)
  Merge pull request #1481 from arunagw/lib_assets
  Improve ordering of multiple columns on postgresql
  judgement -> judgment, according to guidelines
  Follow rails convention by using Array.wrap
  Allow to specify mass-assignment roles as array
  Apply the default scope earlier when doing calculations. Fixes #1682.
  updated rspec link
  grammar changes in named routes description and clarity around possibilities for options
  font style changes in perf guide
  grammar changes to log subscriber docs
  move example code to be above reconfiguring discussion; add clarity about silencers and filters; misc grammar changes - for backtrace cleaners
  Fixed typo
  use present tense on examples
  more detail on how the flow between redirect and show works, and minor grammar
  remove extra space and clarify how an exception is made for controller wide layouts
  reorder layout selection examples to occur in the order that the code does, and provide more detail on why each selection is made
  singularize module and be explicit about what is delivered
  grammar (missing "a") and formatting
  elaborate details on why to use _url instead of _path in mailers
  ...

Conflicts:
	actionpack/lib/action_view/helpers/asset_paths.rb
	actionpack/lib/sprockets/helpers/rails_helper.rb
2011-06-27 08:56:37 -07:00
Santiago Pastorino
e65f11494c Merge pull request #1844 from jeroenj/cachesweeper-fix-3-1
Fixes an issue where cache sweepers
2011-06-24 08:44:42 -07:00
Matt Jankowski
bad16df756 grammar changes in named routes description and clarity around possibilities for options 2011-06-23 18:18:07 +02:00
Matt Jankowski
877153843a use present tense on examples 2011-06-23 18:17:39 +02:00
Matt Jankowski
56cf974dbc more detail on how the flow between redirect and show works, and minor grammar 2011-06-23 18:17:34 +02:00
Matt Jankowski
26284ad475 remove extra space and clarify how an exception is made for controller wide layouts 2011-06-23 18:17:28 +02:00
Matt Jankowski
cf1341f386 reorder layout selection examples to occur in the order that the code does, and provide more detail on why each selection is made 2011-06-23 18:17:23 +02:00
Jeroen Jacobs
2b72bb9846 Tests only after filters in cache sweepers 2011-06-23 17:56:37 +02:00
Jeroen Jacobs
a46d231c79 Fixes an issue where cache sweepers with only after filters would have no controller object
It would raise undefined method controller_name for nil
2011-06-23 17:56:24 +02:00
José Valim
90b47bdc34 Edited actionpack/actionpack.gemspec via GitHub 2011-06-23 07:39:45 -07:00
Joshua Peek
a70f65cbdd Revert "Bump sprockets requirement"
This reverts commit 5a7465c2d7.
2011-06-22 11:28:29 -05:00
José Valim
2d3a98db94 Require helpers so autoload is properly setup. 2011-06-21 15:21:53 -03:00
Joshua Peek
5a7465c2d7 Bump sprockets requirement 2011-06-21 11:27:48 -05:00
José Valim
36123b92ee Don't use deprecated stuff. 2011-06-21 13:05:49 -03:00
Joshua Peek
9324b54c33 Assign Rails.cache to sprockets 2011-06-21 09:38:25 -05:00
José Valim
db909f8b3a Rename AV::Helpers::AssetPaths to AV::AssetPaths to solve autoload mess. 2011-06-21 11:27:27 -03:00
Christopher Meiklejohn
03d01ec73e Streamline fragment_for SafeBuffer logic to make it more concise and robust against unsafe buffers. 2011-06-20 14:20:58 -04:00
Chris Eppstein
0e5891ad91 Added a configuration setting:
config.action_controller.default_asset_host_protocol

It's best to leave this unset.

When unset the :request protocol is used whenever it can be and
:relative is used in the other situations.

When set to :request then assets hosts will be disabled when there
is no request in scope and will use the request protocol whenever a
request is in scope.

If set to :relative, then a relative protocol is always used except
for stylesheet link tags which must use the :request protocol to
avoid double downloads in IE6&7.
2011-06-18 12:12:58 -07:00
Chris Eppstein
97208647ef Move the config bootstrapping to initialization to minimize access to the Rails.application global. 2011-06-18 12:10:09 -07:00
Chris Eppstein
a2233638aa Merge remote-tracking branch 'rails/3-1-stable' into asset_urls
* rails/3-1-stable: (68 commits)
  Revert changes done in c56618ec, 51cb7459 and 030950a. The links are pointing to files/*/*.html for usage in api.rubyonrails.org and as a result are broken in GitHub blobs. This is unavoidable (at least for now).
  copy-edits 7c2db6c, cbf2af1, and f391f94
  Added 'Configuring Assets' section to configuring guide
  Update remove_index documentation
  Typo.
  minor clean up generators section
  add info that plugin installs need git or svn installed
  document doc:* rake tasks
  typo changes fixed
  fixed typo chnages
  add details on how to use specific annotations in rake:notes
  document how rake notes work
  The name for the plain text template in Rails3 appears to be method.text.erb, not, method.text.plain.erb.  Updated the doc to reflect this change.  Also fixed a reference to an example that was incorrect.
  form => form_for
  Tweak linebreak in ActionController::Redirecting doc
  Updated rails´s guides on the config.serve_static_assets and it´s settings in production mode using WEBrick. This documentation has it´s roots in #issue1657. You have to set config.serve_static_assets to true in production mode with WEBrick as only this includes ActionDispatch::Static.
  Improve documentation around status code argument of redirect_to
  minor copy edit 0bdeddb
  Jruby => JRuby, Mysql => MySQL
  Moving hint down. As required after all database examples.
  ...
2011-06-18 09:41:29 -07:00
R.T. Lechow
e63fd899c7 Typo. 2011-06-18 11:42:01 +02:00
Vijay Dev
96b82aa2be form => form_for 2011-06-18 11:41:03 +02:00
Christine Yen
bb139ed0cf Tweak linebreak in ActionController::Redirecting doc 2011-06-18 11:40:58 +02:00