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 'date' | |
require 'benchmark' | |
n = 1_000_000 | |
start_date = Date.new(2012, 01, 01) | |
end_date = Date.new(2012, 03, 01) | |
act_date = Date.new(2012, 02, 01) | |
Benchmark.bm(10) do |x| | |
x.report('include?') do |
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
# Place this file in the root of your project directory | |
# eg. APPNAME=tito | |
APPNAME= | |
# eg. APP_SERVERS=(deploy@app1.tito.io deploy@app2.tito.io) | |
APP_SERVERS=() | |
# eg. CACHE_DIRS=(public/cache) | |
CACHE_DIRS=() |
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
#Add this new method | |
#activeadmin-0.4.0\lib\active_admin\views\pages\show.rb | |
#after def attributes_table | |
def attributes_table_for_resource(specified_resource, *args, &block) | |
panel(I18n.t('active_admin.details', :model => "#{specified_resource.class.name} #{specified_resource.id}")) do | |
attributes_table_for specified_resource, *args, &block | |
end | |
end |