Class: ActiveRecord::ConnectionAdapters::SQLServerColumn
- Defined in:
- lib/connection_adapters/sqlserver_adapter.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(name, default, sql_type = nil, identity = false, null = true) ⇒ SQLServerColumn
constructor
Borrowed verbatim from standard Rails sqlserver_adapter.
- #is_nullable? ⇒ Boolean
Constructor Details
#initialize(name, default, sql_type = nil, identity = false, null = true) ⇒ SQLServerColumn
Borrowed verbatim from standard Rails sqlserver_adapter. Had to re-implement a bit of functionality here to avoid a dependency on SQLServerColumn.identity accessor
Once the ActiveRecord gem includes the latest version of sqlserver_adapter, I’ll be to remove this code
18 19 20 21 |
# File 'lib/connection_adapters/sqlserver_adapter.rb', line 18 def initialize(name, default, sql_type = nil, identity = false, null = true) if !(default.nil? || default.blank?) then @default_specified = true end super(name, default, sql_type, null) end |
Instance Method Details
#is_nullable? ⇒ Boolean
7 8 9 |
# File 'lib/connection_adapters/sqlserver_adapter.rb', line 7 def is_nullable? @null || @default_specified || @identity end |