Module: RailsDb::Connection
- Defined in:
- lib/rails_db/connection.rb
Instance Method Summary collapse
- #column_names ⇒ Object
- #column_properties ⇒ Object
- #columns ⇒ Object
- #connection ⇒ Object
- #to_param ⇒ Object
Instance Method Details
#column_names ⇒ Object
20 21 22 |
# File 'lib/rails_db/connection.rb', line 20 def column_names columns.collect(&:name) end |
#column_properties ⇒ Object
12 13 14 |
# File 'lib/rails_db/connection.rb', line 12 def column_properties %w(name sql_type null limit precision scale type default) end |
#columns ⇒ Object
8 9 10 |
# File 'lib/rails_db/connection.rb', line 8 def columns connection.columns(name) end |
#connection ⇒ Object
4 5 6 |
# File 'lib/rails_db/connection.rb', line 4 def connection ActiveRecord::Base.connection end |
#to_param ⇒ Object
16 17 18 |
# File 'lib/rails_db/connection.rb', line 16 def to_param name end |