We'd like you to finish building the Rails application with a few key components to demonstrate proficiency in many common Ruby, Rails and Vue patterns, which you'll find yourself using day-to-day here.
We expect this exercise to take 2-4 hours at the most. If you ran out of time, please comment on what remains to be done in the README.
For this challenge, the default configurations should work as-is. Feel free to update the configurations for your implementation of the challenge, if needed.
The app has the following models:
- A model to represent a carrier with a flat rate. It has the following attributes:
- Name of company
- A model to represent shipping rates that each carrier has (different from the carrier's flat rate). It has the following attributes:
- Rate as a float value
- Origin, as two-letter country code
- Destination, as two-letter country code
- Relationship to the carrier
To run the app:
yarn
bundle
bin/rails db:create
bin/rails db:migrate
bin/rails s
Please utilize the Rails app to store, look up and update rates from shipping service providers.
- Create a way to load the CSV's
carrier_data.csv
andrate_data.csv
into the database using these models. - Implement API endpoints to fetch rates and update them.
- Add any specs you think are necessary.
The repo has Vue already installed with Webpacker.
- Fetch the data from the Rails app on page load.
- Update the rates index view with a list of: carrier's name, origin, destination, rate from the backend endpoint.
- Style the view to match the mockup, and make it responsive.
- Create a simple bare-bones form that allows editing and updating the rate using the backend endpoint.
- Update the README.MD with how to run your app and how to load your data.
- Any details or decisions you want us to know about.
- In a short paragraph: if you had more time, how would you improve your implementation and what would you do differently?
We encourage you to demonstrate your workflow via Git commits with good messages.
When you are done, please zip up your repo and email it to [email protected]. If you need to clarify anything regarding this challenge, feel free to email us as [email protected].