<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tiny_mce/controller.rb</filename>
    </added>
    <added>
      <filename>lib/tiny_mce/helpers.rb</filename>
    </added>
    <added>
      <filename>lib/tiny_mce/options_validator.rb</filename>
    </added>
    <added>
      <filename>lib/tiny_mce/spellchecker.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,13 +1 @@
-# Require all the necessary files to run TinyMCE
 require 'tiny_mce'
-require 'options_validator'
-require 'spellchecker'
-require 'tiny_mce_helpers'
-
-# Load up the available configuration options (we do it here because
-# the result doesn't, so we don't want to load it per request)
-TinyMCE::OptionValidator.load
-
-# Include the TinyMCE methods and TinyMCE Helpers into ActionController::Base
-ActionController::Base.send(:include, TinyMCE)
-ActionController::Base.send(:helper, TinyMCEHelpers)</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,40 +1,19 @@
-# The base module we include into ActionController::Base
 module TinyMCE
+end
 
-  # When this module is included, extend it with the available class methods
-  def self.included(base)
-    base.extend(ClassMethods)
-  end
-
-  module ClassMethods
-
-    # The controller declaration to enable tiny_mce on certain actions.
-    # Takes options hash, raw_options string, and any normal params you
-    # can send to a before_filter (only, except etc)
-    def uses_tiny_mce(options = {})
-      tiny_mce_options = options.delete(:options) || {}
-      raw_tiny_mce_options = options.delete(:raw_options) || ''
-
-      # If the tiny_mce plugins includes the spellchecker, then form a spellchecking path,
-      # add it to the tiny_mce_options, and include the SpellChecking module
-      if !tiny_mce_options[:plugins].blank? &amp;&amp; tiny_mce_options[:plugins].include?('spellchecker')
-        tiny_mce_options.reverse_merge!(:spellchecker_rpc_url =&gt; &quot;/&quot; + self.controller_name + &quot;/spellchecker&quot;)
-        self.class_eval do
-          include TinyMCE::SpellChecker
-        end
-      end
-
-      # Set instance vars in the current class
-      proc = Proc.new do |c|
-        c.instance_variable_set(:@tiny_mce_options, tiny_mce_options)
-        c.instance_variable_set(:@raw_tiny_mce_options, raw_tiny_mce_options)
-        c.instance_variable_set(:@uses_tiny_mce, true)
-      end
+# Require all the necessary files to run TinyMCE
+require 'tiny_mce/controller.rb'
+require 'tiny_mce/options_validator'
+require 'tiny_mce/spellchecker'
+require 'tiny_mce/helpers'
 
-      # Run the above proc before each page load this method is declared in
-      before_filter(proc, options)
-    end
+# Load up the available configuration options (we do it here because
+# the result doesn't, so we don't want to load it per request)
+TinyMCE::OptionValidator.load
 
-  end
+# Include the TinyMCE methods and TinyMCE Helpers into ActionController::Base
 
+if defined?(Rails) &amp;&amp; defined?(ActionController)
+  ActionController::Base.send(:include, TinyMCE::Controller)
+  ActionController::Base.send(:helper, TinyMCEHelpers)
 end</diff>
      <filename>lib/tiny_mce.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/options_validator.rb</filename>
    </removed>
    <removed>
      <filename>lib/spellchecker.rb</filename>
    </removed>
    <removed>
      <filename>lib/tiny_mce_helpers.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>cc74312599fafcfd2e01ac2edc569f385c739dff</id>
    </parent>
  </parents>
  <author>
    <name>Alexander Semyonov</name>
    <email>rotuka@rotuka.com</email>
  </author>
  <url>http://github.com/kete/tiny_mce/commit/a1cc2e5ca329e27407f5adeb9a9f0cfd8601da79</url>
  <id>a1cc2e5ca329e27407f5adeb9a9f0cfd8601da79</id>
  <committed-date>2009-08-31T19:20:22-07:00</committed-date>
  <authored-date>2009-08-31T19:20:22-07:00</authored-date>
  <message>moved code to follow require conventions</message>
  <tree>a4e4757a2f109d668a7c7f0d65386c00b869fd82</tree>
  <committer>
    <name>Alexander Semyonov</name>
    <email>rotuka@rotuka.com</email>
  </committer>
</commit>
