This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register Post do | |
collection_action :favorite, :method => :post, :batch_action => true do | |
# DO STUFF | |
end | |
end | |
#vs. | |
ActiveAdmin.register Post do | |
batch_action :favorite do |selection| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/(^\d{5}$)|(^\d{5}-\d{4}$)|(^[a-zA-Z]\d[a-zA-Z] ?\d[a-zA-Z]\d$)/i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
require 'jslint' | |
describe "Javascript" do | |
before do | |
@lint = JSLint::Lint.new( | |
:paths => ['public/javascripts/**/*.js'], | |
:exclude_paths => ['public/javascripts/vendor/**/*.js'], | |
:config_path => 'spec/support/jslint.yml' |
NewerOlder