This was a cool finding today. In Carrierwave’s uploader classes we can override specific configurations by creating class methods. 1) The non-secure way. Creates link anyone can access. class LandscapeUploader < CarrierWave::Uploader::Base storage :fog   def self.fog_public true end end 2) A more secure way. class ResumeUploader < CarrierWave::Uploader::Base storage :fog   def self.fog_public false end end 3) In this case we can even upload to a different CDN class GiantRobotBlueprintUploader < CarrierWave::Uploader::Base storage :fog   def self.asset_host "https://cdn.supersecretproject.com" end   end :)

When calling a related table it is possible to group your results with a hash key. Comment.select(:commentable_type, :id).group_by(&:commentable_type) => { "Post"=> [#<Comment id: 2, commentable_type: "Post">, #<Comment id: 3, commentable_type: "Post">], "User"=> [#<Comment id: 4, commentable_type: "User">, #<Comment id: 5, commentable_type: "User">] } :)