Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Customization example: log_level, single task #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ Each asset task will invoke `assets:environment` first. By default this loads th

Also see [Sprockets::Rails::Task](https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/task.rb) and [Rake::SprocketsTask](https://github.com/rails/sprockets/blob/master/lib/rake/sprocketstask.rb).

##### Example: Customizing the log_level of a single task

After `Rails.application.load_tasks` has happened, it's necessary to `clear` existing tasks before re-generating them.

```
Rake::Task['assets:precompile'].clear
Rake::SprocketsTask.new do |t|
t.log_level = ::Logger::WARN # Default is INFO
end
```

### Initializer options

**`config.assets.unknown_asset_fallback`**
Expand Down