<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/live_validator/live_validator_generator.rb</filename>
    </added>
    <added>
      <filename>generators/live_validator/templates/controller_template.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class LiveValidationsController &lt; ApplicationController
   # Poll with /live_validations/uniqueness?model_class=User&amp;column=username&amp;value=theusername. Returns
-  # either 'true' or 'false'. This should probably be converted to some adapter specific code.
+  # either 'true' or 'false'.
   def uniqueness
     responder = LiveValidations.current_adapter.validation_responses[:uniqueness]
     render :text =&gt; responder.respond(params)</diff>
      <filename>app/controllers/live_validations_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,15 +37,6 @@ module LiveValidations
       @form_for_options_proc = block
     end
     
-    # Controller hooks are only supported in 2.3 and above.
-    def self.supports_controller_hooks?
-      if Rails::VERSION::MAJOR == 2
-        return Rails::VERSION::MINOR &gt;= 3
-      else
-        return Rails::VERSION::MAJOR &gt; 2
-      end
-    end
-    
     def render_json
       self.class.json_proc.call(self)
     end</diff>
      <filename>lib/live_validations/adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -73,18 +73,16 @@ module LiveValidations
         add_custom_rule(v, attribute, Digest::SHA1.hexdigest(js_regex), &quot;return #{js_regex}.test(value)&quot;, v.callback.options[:message] || I18n.translate('activerecord.errors.messages')[:invalid])
       end
       
-      if supports_controller_hooks?
-        validates :uniqueness do |v, attribute|
-          model_class = v.adapter_instance.active_record_instance.class.name
-          v.json[attribute]['remote'] = &quot;/live_validations/uniqueness?model_class=#{model_class}&quot;
-          v.messages[attribute]['remote'] = v.callback.options[:message] || I18n.translate('activerecord.errors.messages')[:taken]
-        end
-      
-        response :uniqueness do |r|
-          column  = r.params[r.params[:model_class].downcase].keys.first
-          value   = r.params[r.params[:model_class].downcase][column]
-          r.params[:model_class].constantize.count(:conditions =&gt; {column =&gt; value}) == 0
-        end
+      validates :uniqueness do |v, attribute|
+        model_class = v.adapter_instance.active_record_instance.class.name
+        v.json[attribute]['remote'] = &quot;/live_validations/uniqueness?model_class=#{model_class}&quot;
+        v.messages[attribute]['remote'] = v.callback.options[:message] || I18n.translate('activerecord.errors.messages')[:taken]
+      end
+    
+      response :uniqueness do |r|
+        column  = r.params[r.params[:model_class].downcase].keys.first
+        value   = r.params[r.params[:model_class].downcase][column]
+        r.params[:model_class].constantize.count(:conditions =&gt; {column =&gt; value}) == 0
       end
       
       json do |a|</diff>
      <filename>lib/live_validations/adapters/jquery_validations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,32 +1,7 @@
 require File.join(File.dirname(__FILE__), &quot;test_helper&quot;)
 
 class GeneralAdapterTest &lt; ActiveSupport::TestCase
-  def test_supports_controller_hooks
-    Rails::VERSION.instance_eval {
-      remove_const('MAJOR')
-      remove_const('MINOR')
-      const_set('MAJOR', 1)
-      const_set('MINOR', 2)
-    }
-    
-    assert !LiveValidations::Adapter.supports_controller_hooks?
-    
-    Rails::VERSION.instance_eval {
-      remove_const('MAJOR')
-      remove_const('MINOR')
-      const_set('MAJOR', 2)
-      const_set('MINOR', 3)
-    }
-    
-    assert LiveValidations::Adapter.supports_controller_hooks?
-    
-    Rails::VERSION.instance_eval {
-      remove_const('MAJOR')
-      remove_const('MINOR')
-      const_set('MAJOR', 3)
-      const_set('MINOR', 0)
-    }
-    
-    assert LiveValidations::Adapter.supports_controller_hooks?
+  def test_whoops
+    # There should probably be some tests here. Probably.
   end
 end
\ No newline at end of file</diff>
      <filename>test/general_adapter_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>11a982bd57fa7d876493d64df85a34dd036e8112</id>
    </parent>
  </parents>
  <author>
    <name>August Lilleaas</name>
    <email>augustlilleaas@gmail.com</email>
  </author>
  <url>http://github.com/holman/live-validations/commit/dd13a2e9238437bea817b37da8a5c25cda9f536a</url>
  <id>dd13a2e9238437bea817b37da8a5c25cda9f536a</id>
  <committed-date>2009-02-26T10:40:47-08:00</committed-date>
  <authored-date>2009-02-26T10:40:47-08:00</authored-date>
  <message>Instead of making controller callbacks 2.3 only, I'm adding a generator so that pre 2.3 people (which is everyone at the moment) can use it. ./script/generate live_validator.</message>
  <tree>b3a57401f7bfbd6e897cb93606030f618315a7a6</tree>
  <committer>
    <name>August Lilleaas</name>
    <email>augustlilleaas@gmail.com</email>
  </committer>
</commit>
