Sha256: e1e3586683c71cdaa04d63aff339b2f28dfd373cde65ff3456d72e5deec6f36d

Contents?: true

Size: 199 Bytes

Versions: 10

Compression:

Stored size: 199 Bytes

Contents

module DbInit
  extend ActiveSupport::Concern

  module ClassMethods
    def init_db
      self.destroy_all
      ActiveRecord::Base.connection.reset_pk_sequence!(self.table_name)
    end
  end


end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tmatt_cms-0.1.9 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.8 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.7 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.6 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.5 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.4 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.3 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.2 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.1 lib/generators/tmatt_cms/templates/concerns/db_init.rb
tmatt_cms-0.1.0 lib/generators/tmatt_cms/templates/concerns/db_init.rb