rails-sqlserver/activerecord-sqlserver-adapter — Issue #127: Problem With Table Name
Author: drobazko
Created: 2011-10-13 13:13:59+00:00
State: open

I'm on Windows XP...
Ruby 1.9.2
Rails 3.0.9
MS SQL Server 2005

I'm using **tiny_tds + activerecord-sqlserver-adapter**

I have simple database that consists of only one table named **t4**.
I have created a model like this: **rails generate model t4**
Here is my simple model **t4.rb**:

```ruby
class T4 < ActiveRecord::Base
end
```
Here is migration file **20111013125957_create_t4s.rb**:

```ruby
class CreateT4s < ActiveRecord::Migration
def self.up
create_table :t4s do |t|
t.timestamps
end
end

def self.down
drop_table :t4s
end
end
```

**Problem:**
When I try **T4.select("title").where(["id = 3"])** I get error message:
*ActiveRecord::StatementInvalid: TinyTds::Error: Invalid object name 't4s'.: SELECT title FROM [t4s] WHERE (id = 3)*

Maybe it's related it's related with **Inflector class** ussues?

Help, please!