Skip to content

Commit

Permalink
Do NOT create time scope if the table does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaniwaki committed Oct 21, 2014
1 parent d666237 commit 7003b22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/active_record/time_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def self.included(base)

module ClassMethods
def create_time_scopes
return unless table_exists?
column_names.each do |cn|
verb = cn.sub TIME_POSTFIX_REGEXP, ''
next if verb == cn
Expand Down

0 comments on commit 7003b22

Please sign in to comment.