Skip to content

Instantly share code, notes, and snippets.

View rsierra's full-sized avatar
🏠
Working from home

Ruben Sierra rsierra

🏠
Working from home
View GitHub Profile
@rsierra
rsierra / rawclone_bundler.rb
Last active September 28, 2015 06:38
Script para generar el Gemfile de bundler a partir de un 'gem list'
#!/usr/bin/env ruby
# So you want to start developing an already "woking" project. No
# bundle, config.gem's not present or messing up dependencies. Fear
# not!
# Do a "gem list" wherever the project is already working
# (production?, some colleage machine?). Make a file with this format:
#
# chronic (0.2.3)
# colored (1.1)
@rsierra
rsierra / availability.rb
Created September 23, 2011 18:35
Modelo de disponibilidades
class Availability < ActiveRecord::Base
DEFAULT_RENT = "General"
MINIMUM_MINUTES_DURATION = 90
MINIMUN_HOURS_MARGIN = 1
MINIMUN_MINUTES_SEGMENT = 15
belongs_to :rent
belongs_to :carpark
validates_associated :carpark