Skip to content

Instantly share code, notes, and snippets.

@mcasimir
mcasimir / static_map_helper.rb
Created May 24, 2012 01:32
Google Maps Static map helper for Ruby on Rails
module StaticMapHelper
def static_map_for(location, options = {})
params = {
:center => [location.lat, location.lng].join(","),
:zoom => 15,
:size => "300x300",
:markers => [location.lat, location.lng].join(","),
:sensor => true
}.merge(options)
Gem::Specification.new do |s|
s.name = 'paperclip_schema'
s.summary = 'A Ruby Micro Gem for use Paperclip with ActiveRecordSchema and S3.'
s.version = '0.0.2'
s.platform = Gem::Platform::RUBY
s.files = %w(paperclip_schema.rb)
s.require_path = '.'
s.author = 'Maurizio Casimirri'
@mcasimir
mcasimir / README.md
Created May 7, 2012 17:19
FriendlyIdSchema is a micro gem for Ruby on Rails with which you can add permalinks to models with ActiveRecordSchema and FriendlyId

FriendlyIdSchema

FriendlyIdSchema is a micro gem that combines FriendlyId with ActiveRecordSchema

Usage

Call #permalink inside a model like this:

class Post