class RailsDbInfo::Table
Attributes
name[R]
Public Class Methods
new(table_name)
click to toggle source
# File lib/rails_db_info/table.rb, line 6 def initialize(table_name) @name = table_name end
Public Instance Methods
column_properties()
click to toggle source
# File lib/rails_db_info/table.rb, line 14 def column_properties %w(name sql_type null limit precision scale type default) end
columns()
click to toggle source
# File lib/rails_db_info/table.rb, line 10 def columns connection.columns(name) end
to_param()
click to toggle source
# File lib/rails_db_info/table.rb, line 18 def to_param name end
Private Instance Methods
connection()
click to toggle source
# File lib/rails_db_info/table.rb, line 25 def connection ActiveRecord::Base.connection end