bguthrie / resource_full

A comprehensive resource modelling and querying framework for ActionController.

resource_full / init.rb
100644 11 lines (8 sloc) 0.331 kb
1
2
3
4
5
6
7
8
9
10
11
# Include hook code here
if !Object.constants.include?("RESOURCE_FULL_PLUGIN_INCLUDED")
  RESOURCE_FULL_PLUGIN_INCLUDED = true
 
  if ([Rails::VERSION::MAJOR, Rails::VERSION::MINOR] <=> [2,1]) >= 0 # if the rails version is 2.1 or greater...Í
    ActiveRecord::Base.include_root_in_json = true
  end
 
  require 'resource_full'
end