Module: BlogDbConnect

Defined in:
lib/generators/blog_io/templates/db_connector_template.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'lib/generators/blog_io/templates/db_connector_template.rb', line 2

def self.included(base)
  base.class_eval do
    def self.connect_to_db(get_table_name)
      establish_connection('blog_db_connector')
      self.table_name = get_table_name
      self.include_root_in_json = true
    end
  end
end