ActiveRecord::StatementInvalid: PGError: ERROR: missing FROM-clause entry for table "users_changes" LINE 1: ..." AS t1_r18, "users"."email_signature" AS t1_r19, "users_cha... ^ : SELECT "changes"."id" AS t0_r0, "changes"."changable_object_id" AS t0_r1, "changes"."changable_object_type" AS t0_r2, "changes"."user_id" AS t0_r3, "changes"."user_login" AS t0_r4, "changes"."change_list" AS t0_r5, "changes"."change_type" AS t0_r6, "changes"."backtrace" AS t0_r7, "changes"."created_at" AS t0_r8, "changes"."rake_task" AS t0_r9, "users"."id" AS t1_r0, "users"."login" AS t1_r1, "users"."password" AS t1_r2, "users"."email" AS t1_r3, "users"."firstname" AS t1_r4, "users"."lastname" AS t1_r5, "users"."props" AS t1_r6, "users"."deleted_at" AS t1_r7, "users"."phone" AS t1_r8, "users"."fax" AS t1_r9, "users"."synced_at" AS t1_r10, "users"."created_at" AS t1_r11, "users"."updated_at" AS t1_r12, "users"."filter_id" AS t1_r13, "users"."is_locked" AS t1_r14, "users"."password_expires_at" AS t1_r15, "users"."location_filter_id" AS t1_r16, "users"."promonet_id" AS t1_r17, "users"."password_hash" AS t1_r18, "users"."email_signature" AS t1_r19, "users_changes"."id" AS t2_r0, "users_changes"."login" AS t2_r1, "users_changes"."password" AS t2_r2, "users_changes"."email" AS t2_r3, "users_changes"."firstname" AS t2_r4, "users_changes"."lastname" AS t2_r5, "users_changes"."props" AS t2_r6, "users_changes"."deleted_at" AS t2_r7, "users_changes"."phone" AS t2_r8, "users_changes"."fax" AS t2_r9, "users_changes"."synced_at" AS t2_r10, "users_changes"."created_at" AS t2_r11, "users_changes"."updated_at" AS t2_r12, "users_changes"."filter_id" AS t2_r13, "users_changes"."is_locked" AS t2_r14, "users_changes"."password_expires_at" AS t2_r15, "users_changes"."location_filter_id" AS t2_r16, "users_changes"."promonet_id" AS t2_r17, "users_changes"."password_hash" AS t2_r18, "users_changes"."email_signature" AS t2_r19, "regions"."id" AS t3_r0, "regions"."name" AS t3_r1, "regions"."parent_id" AS t3_r2, "regions"."user_id" AS t3_r3, "regions"."position" AS t3_r4, "regions"."deleted_at" AS t3_r5 FROM "changes" LEFT OUTER JOIN "users" ON "users"."id" = "changes"."user_id" LEFT OUTER JOIN "regions_users" ON "regions_users"."user_id" = "users"."id" LEFT OUTER JOIN "regions" ON "regions"."id" = "regions_users"."region_id" WHERE (users.deleted_at IS NULL) from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `log' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:496:in `execute' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:982:in `select_raw' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:975:in `select' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/query_cache.rb:56:in `select_all' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/base.rb:467:in `find_by_sql' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/relation.rb:64:in `to_a' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/relation/finder_methods.rb:189:in `find_with_associations' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/relation.rb:64:in `to_a' from /Users/bunderwood/Sites/vmm/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0/lib/active_record/relation/finder_methods.rb:143:in `all' from (irb):44