Public Gists by mlomnicki

Gravatar
Sun Sep 27 16:15:12 -0700 2009
1
2
3
#!/usr/bin/env ruby
require 'yaml'
 
gist: 192008 List missing indexes
Gravatar
Wed Sep 23 06:37:58 -0700 2009
1
2
3
c = ActiveRecord::Base.connection
c.tables.collect do |t|
  columns = c.columns(t).collect(&:name).select {|x| x.ends_with?("_id" || x.ends_with("_type"))}
Gravatar
Tue Sep 22 10:43:04 -0700 2009
1
2
3
def find_family_view_for_state_with_caching(state, action_view)
  return find_family_view_for_state(state, action_view) unless ActionController::Base.perform_caching