Skip to content

Instantly share code, notes, and snippets.

View eloyesp's full-sized avatar

Eloy Espinaco eloyesp

View GitHub Profile
#!/usr/bin/env ruby
#
# Syncs Ruby binstubs for ruby-communal-gems.
# Run this everytime you install a new Ruby, or when you install a new gem
# with a bin/ command. (ie, when you typically do rbenv rehash)
#
# See: https://github.com/tpope/rbenv-communal-gems/issues/5
#
require 'fileutils'
@eloyesp
eloyesp / archivo.md
Last active August 29, 2015 14:03 — forked from olvap/archivo.md

App de rails

rails new archivo
cd archivo

Scaffold

La instrucción scaffold, ejecuta la instrucción model y controller para hacer un CRUD de un recurso dado. Es como hacer rails g model y rails g controller.

@eloyesp
eloyesp / archivo.md
Last active August 29, 2015 14:03 — forked from olvap/archivo.md

App de rails

rails new archivo cd archivo

scaffold

La instrucción scaffold, ejecuta la instrucción model y controller para hacer un CRUD de un recurso dado. Es como hacer rails g model y rails g controller.

rails g scaffold file_record title 

rails g scaffold office name

@eloyesp
eloyesp / assets.rake
Created March 5, 2012 10:39 — forked from thermistor/assets.rake
Check asset encoding for valid UTF-8 and autoconvert from ISO-8859-15
def assets_with_encoding_problems
results = {}
paths = ["app/assets", "lib/assets", "vendor/assets"]
paths.each do |path|
Dir[Rails.root + path + "**" + "*.{js,css}"].each do |file|
# make sure we're not trying to process a directory
raise "directory bad named: #{file} " if File.directory?(file)
# read the file and check its encoding
data = File.read(file)
results[file] = data unless data.valid_encoding?
es-AR:
errors:
messages:
not_found: 'no encontrado'
already_confirmed: 'ya ha sido confirmada'
not_locked: 'no está bloqueada'
devise:
failure:
unauthenticated: 'Necesitas acceder a tu cuenta o registrarte antes de continuar.'