No commit activity in last 3 years
No release in over 3 years
This gem makes browser to reload the page when the rails APP is updated. This is usefull for Single Page APPs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0
 Project Readme

Requirements

  • angular
  • angular-cookies (ngCookies)

Rails setup for angular

Add gem

gem 'frontend_reload_control'

Add in application.js

//= require frontend_reload_control

Inject "frontendReloadControl" on your Angular module and Add on your main modules

.config(function ($httpProvider) {
  $httpProvider.interceptors.push('FrontendReloadControlInterceptor')
})

Cors (optional)

If your frontend and api has diferents domains you need to configure CORS to expose X-Frontend-Reload-Control-Timestamp header. Need help? https://github.com/cyu/rack-cors

Tips

This gem will looks for timestamp.txt file on root of project to setup the actual version of app, if it doesn't exists it will use Time.now.to_i at APP startup.

If you want to avoid browser to reload for each APP restarts you need to create timestamp.txt with current timestamp when you deploy/update your APP.