Articles about serving static assest from cloudfront: http://thediscoblog.com/blog/2013/05/01/the-rails-cloudfront-and-heroku-performance-hat-trick/ http://blog.codeship.io/2012/05/18/assets-sprites-cdn.html #heroku
Articles about serving static assest from cloudfront: http://thediscoblog.com/blog/2013/05/01/the-rails-cloudfront-and-heroku-performance-hat-trick/ http://blog.codeship.io/2012/05/18/assets-sprites-cdn.html #heroku
Push to Heroku and reset production database:
$ git push heroku
$ heroku pg:reset DATABASE
$ heroku run rake db:migrate
$ heroku run rake db:populate
#heroku #howto
Generate random date range near now:
require 'rubygems'
require 'active_support/all'
def time_rand from = 0.0, to = Time.now
Time.at(from + rand * (to.to_f - from.to_f))
end
9.times do
start_date = time_rand(Time.now, Time.now + 2.months )
end_date = time_rand(start_date, start_date + 9.weeks )
puts "Random date #{start_date} to #{end_date}"
end
#dates
Send an email:
# Tell the UserMailer to send a welcome Email after save
TenantMailer.test_email(current_tenant).deliver
Future: http://blog.plataformatec.com.br/2011/06/multipart-templates-with-markerb/ Create one version of the email in Markdown syntax and generate the multi-part plain text and html. #howto
How do I test the ActionMailer?
How do I test the CarrierWave image saving?
#testing
http://blog.aclarke.eu/crop-and-resize-an-image-using-minimagick/ #images
FASO saves 8 different versions of each artwork image
2000 x
1024 x
550 x
300 x
120 x
100 x 100 square
100 x
72 x
#images
Getting confused between these pages: - Tenant account profile page - Tenant signed-in home page to manage art - Guest user view of a tenant. (make Artist controller for this?) - Adapting tutorial here today - http://ruby.railstutorial.org/chapters/user-microposts#sec-sample_microposts