diff options
-rw-r--r-- | lib/arel/select_manager.rb | 1 | ||||
-rw-r--r-- | spec/arel/select_manager_spec.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 20c97f198a..daef9f52ca 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -51,6 +51,7 @@ module Arel end def from table + table = Nodes::SqlLiteral.new(table) if String === table @ctx.froms = [table] self end diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index 3fe68a8db0..e309286eba 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -60,7 +60,7 @@ module Arel manager.from table manager.from 'users' manager.project table['id'] - manager.to_sql.should be_like 'SELECT "users"."id" FROM \'users\'' + manager.to_sql.should be_like 'SELECT "users"."id" FROM users' end end |