brendan / entrails

brendan's ENhancements To Rails

This URL has Read+Write access

entrails / lib / entrails.rb
100644 23 lines (19 sloc) 1.174 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Entrails
  VERSION='1.0.6'
  AUTHORS=["Brendan Baldwin"]
  EMAIL=["brendan@usergenic.com"]
  DESCRIPTION=%q{This is a collection of extensions to Rails internals that I've found to be absolutely indispensible since I implimented them. The real action is happening in the following two files at the moment: http://github.com/brendan/entrails/tree/master/lib/entrails/active_record/better_conditions.rb http://github.com/brendan/entrails/tree/master/lib/entrails/active_record/find_by_association.rb}
  FOLDER=File.expand_path(File.join(File.dirname(__FILE__),'..'))
  MANIFEST=Dir.glob(File.join(FOLDER,'**','*')).map{|path|path[FOLDER.size+1..-1]}
  HOMEPAGE="http://github.com/brendan/entrails"
end
 
require 'entrails/action_controller'
require 'entrails/active_record'
 
if defined?(ActionController)
  ActionController::Routing::RouteSet.send(:include, Entrails::ActionController::NamedRouteParameter)
  ActionController::Base.send(:include, Entrails::ActionController::TemplateForReferer)
end
 
if defined?(ActiveRecord)
  ActiveRecord::Base.extend Entrails::ActiveRecord::BetterConditions
  ActiveRecord::Base.extend Entrails::ActiveRecord::FindByAssociation
end