Simple internal application to visualize payroll and inform salary decisions at Bendyworks. Please feel encouraged to fork this and use for your company's needs as well. Pull requests encouraged!
We're using google_visualr gem for graphing. Documentation
To get this up and running:
- clone it
- Make sure rvm, yarn, and the correct ruby are installed
bundle install
rake db:setup
yarn install
./bin/webpack-dev-server
rails s
- visit localhost:3000
To run the tests:
rake
To deploy:
- once:
git remote add heroku https://git.heroku.com/bendyworks-payroll.git
bin/deploy.sh
To create a new user:
- From the project directory, start the console with
rails c
. User.create(email: '[email protected]', password: 'yourpassword')
To change your password in the console:
- From the project directory, start the console with
rails c
. u = User.find_by_email('[email protected]')
u.update password: 'newpassword'
Using React Components
- React components live inside app/javascript/components
- Components can be rendered inside the views with:
= react_component("ComponentName", props: {})
= react_component("ComponentName", props: {}, {prerender: true})
Let's use page specific JavaScript, which means that you need to remember these main ideas:
- Don't
// require_tree .
in theapplication.js
manifest. JavaScript assets still live in theapp/assets/javascripts/
directory. - Add new JavaScript assets to
config/intializers/assets.rb
'sRails.application.config.assets.precompile
list. - Include the JavaScript in the specific view where it is required
by using a
javascript_include_tag
.