ProctorU / squint

Search PostgreSQL jsonb and hstore columns
MIT License
26 stars 3 forks source link

Research adding Railtie to get hot reloading #14

Open dwilkins opened 7 years ago

dwilkins commented 7 years ago

from a slack message (thanks @chevinbrown)

class MyRailtie < Rails::Railtie
  # Customize the ORM
  config.app_generators.orm :my_railtie_orm

  # Add a to_prepare block which is executed once in production
  # and before each request in development.
  config.to_prepare do
    MyRailtie.setup!
  end
end

Gotta add this to rails plugin gems to get hot-reloading during development.

dwilkins commented 7 years ago

Another example https://github.com/RolifyCommunity/rolify/blob/master/lib/rolify/railtie.rb