On my current project I had to calculate date of Wednesday in nth week in mth year.
Here is the trick:
date-extension
Here is the trick:
date-extension
gem 'rails', '3.1.0'
group :assets dorun
gem 'sass-rails', "~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
bundle update railsThen run rake rails:update and resolve conflicts."
config.assets.enabled = truewhich means you are enabling assets pipe-lining which is one of the feature of rails 3.1, I accepted the changes.
config.assets.version = '1.0'
config.action_view.debug_rjs = truewhich has been deprecated, so this line should be deleted, if you are using rjs in views, debugging is not supported now.
config.assets.compress = falsewhich means assets compression is off in development, I accepted the changes.
config.assets.debug = true
config.assets.compress = trueSimply, accept these changes.
config.assets.compile = false
config.assets.digest = true
<%= stylesheet_link_tag "application" %>Again, it is important to understand the behavior of asset pipeline and how it works. For example, in application.js file, you will have:
<%= javascript_include_tag "application" %>
//= require_tree .
/*So, after moving images to app/assets/images directory, I have to remove the relative path of the image:
*= require_self
*= require_tree .
*/
#header { height:20px; }
body {background-image:url(../images/mainBack.png) !important; background-repeat:repeat-x;}
body {background-image:url(mainBack.png) !important; background-repeat:repeat-x;}
config.consider_all_requests_local = true
default :charset => 'utf-8' default :mime_version => '1.0'
default :parts_order => [ "text/plain", "text/enriched", "text/html" ]