<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1 @@
-0.4.1
+0.5.0</diff>
      <filename>VERSION</filename>
    </modified>
    <modified>
      <diff>@@ -5,11 +5,11 @@
 
 Gem::Specification.new do |s|
   s.name = %q{by_star}
-  s.version = &quot;0.3.1&quot;
+  s.version = &quot;0.4.1&quot;
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;Ryan Bigg&quot;, &quot;Mislav Marohni\304\207&quot;]
-  s.date = %q{2009-10-30}
+  s.date = %q{2009-11-04}
   s.description = %q{ActiveRecord extension for easier date scopes and time ranges}
   s.email = %q{radarlistener@gmail.com}
   s.extra_rdoc_files = [</diff>
      <filename>by_star.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ require 'shared'
 require 'range_calculations'
 require 'time_ext'
 require 'vanilla'
+
 Dir[File.dirname(__FILE__) + '/calculations/*.rb'].each { |file| require file }
 require 'calculations'
 module ByStar</diff>
      <filename>lib/by_star.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 module Shared
   def conditions_for_range(start_time, end_time, field=&quot;created_at&quot;)
-    field = connection.quote_table_name(table_name) &lt;&lt; '.' &lt;&lt; connection.quote_column_name(field || &quot;created_at&quot;)
+    field = table_name &lt;&lt; '.' &lt;&lt; (field || &quot;created_at&quot;)
     [&quot;#{field} &gt;= ? AND #{field} &lt;= ?&quot;, start_time.utc, end_time.utc]
   end
   </diff>
      <filename>lib/shared.rb</filename>
    </modified>
    <modified>
      <diff>@@ -575,6 +575,14 @@ describe Post do
       end
 
     end
+    
+    describe &quot;edge cases&quot; do
+      # This method previously generated sql like: `day_entries`.`spent_at`.`spent_at`.`spent_at`.`spent_at`
+      # Which is *obviously* incorrect and #omg worthy.
+      it &quot;should not spam the field name when using a different field&quot; do
+        Invoice.first.day_entries.between((Time.zone.now - 3.days).to_date, Time.zone.now.to_date, :field =&gt; &quot;spent_at&quot;)
+      end
+    end
   
     describe Time do
       it &quot;should work out the beginning of a weekend (Friday 3pm)&quot; do</diff>
      <filename>spec/by_star_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,11 +16,16 @@ class Event &lt; ActiveRecord::Base
 end
 
 class Invoice &lt; ActiveRecord::Base
+  has_many :day_entries
   def self.factory(value, created_at = nil)
     create!(:value =&gt; value, :created_at =&gt; created_at, :number =&gt; value)
   end
 end
 
+class DayEntry &lt; ActiveRecord::Base
+  
+end
+
 ## seed data:
 
 year = Time.zone.now.year
@@ -85,4 +90,6 @@ Event.create(:name =&gt; &quot;Tomorrow&quot;,         :start_time  =&gt; Time.zone.now.tomorrow
 # For by_weekend test
 Event.create(:name =&gt; &quot;1st of August&quot;,    :start_time  =&gt; &quot;01-08-#{Time.zone.now.year}&quot;.to_time)
 
-Event.create(:name =&gt; &quot;FBI meeting&quot;,      :start_time  =&gt; &quot;02-03-#{Time.zone.now.year}&quot;.to_time, :public =&gt; false)
\ No newline at end of file
+Event.create(:name =&gt; &quot;FBI meeting&quot;,      :start_time  =&gt; &quot;02-03-#{Time.zone.now.year}&quot;.to_time, :public =&gt; false)
+
+Invoice.first.day_entries.create(:spent_at =&gt; Time.zone.now + 1.hour, :name =&gt; &quot;Working harder, better, faster stronger.&quot;)
\ No newline at end of file</diff>
      <filename>spec/fixtures/models.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,4 +27,10 @@ ActiveRecord::Schema.define do
     t.boolean :public, :default =&gt; true
   end
   
+  create_table :day_entries, :force =&gt; true do |t|
+    t.references :invoice
+    t.datetime :spent_at
+    t.string :name
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/fixtures/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>174761a82c17cdcf6a058bf27dba6c29016770e9</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </author>
  <url>http://github.com/radar/by_star/commit/bfadd090962b168577e66fdc641f93aa9abc2de4</url>
  <id>bfadd090962b168577e66fdc641f93aa9abc2de4</id>
  <committed-date>2009-11-03T20:22:21-08:00</committed-date>
  <authored-date>2009-11-03T20:21:39-08:00</authored-date>
  <message>Version bump to 0.5.0 - If you need me to quote YOUR table/field names for you, YOU'RE doing it wrong.</message>
  <tree>e69a41fbfd28b29d9d20b8168c6c3cda7055c551</tree>
  <committer>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </committer>
</commit>
