Skip to content

Instantly share code, notes, and snippets.

View wrkrb33's full-sized avatar

Ken Boss wrkrb33

View GitHub Profile
@wrkrb33
wrkrb33 / abilities_for_subclass_test.rb
Last active June 30, 2017 20:30
test for CanCan abilities with ActiveRecord subclass
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
# Activate the gem you are reporting the issue against.
@wrkrb33
wrkrb33 / gist:3453034
Created August 24, 2012 17:13
rails 3 asset pipeline management
@jrochkind, in fact, after rake assets:precompile, in public/assets I see
<css_manifest_name>.css, <css_manifest_name>.css.gz, <css_manifest_name>-<hash>.css, and
<css_manifest_name>-<hash>.css.gz; and similar files for the .js resources.
I’m not quite sure what rails intends to do with all of those, but can confirm through
firebug that the <css_manifest_name>-<hash>.* compiled versions are what’s delivered to the
client.
The reason that I’m not compiling these into my overall application.js and application.css
files is that they are assets that are only required on a limited subset of pages, so I want