Follow the steps on GitHub's Documentation to create a new repository.
Once you are have a new empty repository, come back here.
Jolly Good Code is a boutique software consultancy that specialises in | |
Agile software engineering practices and Ruby/Ruby on Rails. | |
Founded in 2014, Jolly Good Code is a nimble practice that can help startups | |
build the right product right, with high code quality and speed. | |
At the same time time, Jolly Good Code also provides Agile consulting services | |
and Ruby/Ruby on Rails training as public or corporate workshops. | |
Jolly Good Code is also supporting RedDotRubyConf - an annual Ruby conference |
Follow the steps on GitHub's Documentation to create a new repository.
Once you are have a new empty repository, come back here.
In part 1, we learned how to set up a simple image upload using Carrierwave and Cloudinary.
Although we are able to upload an image, but it lacks image manipulation functionalities, i.e. cropping.
Let's improve our image upload to allow for cropping!
Usually, this involves JavaScript and fortunately, Cloudinary has a JavaScript library which we could use!
User Authentication is an important part of most web applications.
There are gems that can provide awesome authentication functionality out of the box, like Devise and Clearance.
However, it's also a good exercise in learning to implement our own authentication and understand the concepts for building out such a functionality.
web: bundle exec puma -C config/puma.rb -p $PORT | |
worker: bundle exec sidekiq -e $RAILS_ENV -q default -q mailers | |
# By default, sidekiq only operates on the `default` queue | |
# So if you do `Mailer.new(...).deliver_later`, those are queued to the `mailers` queue | |
# Hence you need to explicitly tell Sidekiq to operate on `mailers` queue too | |
# You can also put this into sidekiq.yml |
gem "sqlite3" |
# Dump locally | |
pg_dump DATABASE --no-owner --no-acl -f db.sql | |
# Reset Heroku | |
staging pg:reset | |
# Import to Heroku | |
staging pg:psql < db.sql |
# http://code.google.com/apis/chart/interactive/docs/gallery/bubblechart.html | |
def bubble_chart | |
data_table = GoogleVisualr::DataTable.new | |
data_table.new_column('string', 'ID') | |
data_table.new_column('number', 'Life Expectancy') | |
data_table.new_column('number', 'Fertility Rate') | |
data_table.new_column('string', 'Region') | |
data_table.new_column('number', 'Population') | |
data_table.add_rows( [ |