Presented by Mobirobo (http://www.mobirobo.com/rails-bootcamp)
This seminar is an extremely condensed introduction to Ruby on Rails. The intent is to familiarize you with some of the basic functions of Rails, and if you are participating in Startup Weekend events, you may have enough to leverage the framework.
As such, this intro skips around a bit as we build a basic app.
- Ruby 2.0
- Rails 4
- Postgresql
- Ruby Gems
- Bundler
- Heroku
We are building a hack-a-thon prototype for a stolen bike reporting site. There have been a rash of bike thefts in the Sacramento area. FindMyBike will be a place unfortunate victims can use to register lost bikes, and hopefully others can start to see hot spots of theft as well as report bike sightings.
The project will be "sketched out" in this abbreviated bootcamp. Check out one of our full length classes to dive into a more comprehensive treatment of the project.
We will split this session into 4 parts:
- Make sure our machines are set up
- Pair up as desired
- Create basic Rails app
- Create a git (version control) repo
- Map out the app
- Create some static pages
- Create content for home and about page
- Add contact-us page
- Change the styles to your own color scheme
- Add a simple navigation menu to each page using bootstrap
- Add a shared footer in the layout
- MVC
- More Views and Partials -- build map
- Helpers -- marker helper
- Controllers and Routing -- setup data and examine URLs
- Generators -- save time
- Generate Models following RESTful techniques, Scaffold
- Use rails generator to go back and add a Contact model with name, email, phone, and message
- Use the form that was generated by scaffolding, and put it on contact us page (use the partial)
- Confirm that you can submit a contact from the public page
- Database Modeling, Relations
- User Model and Code Reuse From Gems (Devise)
- Adding Accounts (Authentication)
- Adding Access Control to Bike Controller
- Linking Models Together, applying Relations
- Misc -- Flash message
- Add top user signin/register nav bar widget
- Change to signout and custom greeting when logged in
- Fix formatting of registration flow
- Typing lat and long is a pain, let’s use a gem: geocoder for the bike model
- Creating a real Admin backend (ActiveAdmin)
- Deploying to Heroku
- Create admin model for contacts
- Test that non-admins can’t get into admin control panel
- Add link for admins to get to dashboard when logged in
- Deploy your app
- http://brew.sh/
- http://rvm.io/
- http://www.sourcetreeapp.com/
- http://www.sublimetext.com/
- https://api.heroku.com/signup/devcenter
- https://toolbelt.heroku.com
- https://help.github.com/articles/generating-ssh-keys
- https://github.com/twbs/bootstrap
- https://github.com/anjlab/bootstrap-rails
- https://github.com/anjlab/bootstrap-rails/blob/master/app/assets/stylesheets/twitter/bootstrap/_variables.scss
- http://getbootstrap.com/getting-started/
- https://developers.google.com/maps/documentation/staticmaps/
- https://github.com/plataformatec/devise
- http://www.activeadmin.info/
- http://www.rubygeocoder.com/
- http://www.mobirobo.com/rails-bootcamp
- http://jaysonlane.net/tech-blog/2012/04/rails-devise-and-active-admin-single-user-model/