This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
:codigo_unico => “AR BEL 1 2010 123 - 4”, | |
:first_name => “Dwayne”, | |
:last_name => “Macgowan”, | |
:global_status => “student”, | |
:school_id => 1, | |
:local_status => “former-student”, | |
:contact_info => [ | |
{:type => “email”, :value => “[email protected]”, :lable => “home”}, | |
{:type => “email”, :value => “dwayne.macgowan@mdr”, :lable => “work”}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git :init | |
git :add => "." | |
git :commit => "-a -m 'fresh rails app'" | |
# Authentication | |
gem 'devise', '1.1.5' | |
gem 'devise_cas_authenticable', '1.0.0.alpha4' | |
gem 'cancan' | |
gem 'will_paginate' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -L 3307:127.0.0.1:3306 USERNAME@SERVER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# == Arguments | |
# object: object to evaluate | |
# status: true if updates successfully false if failed | |
def jeditable_result(object, status,options = {}) | |
param = options[:param] || params[:wants] | |
tokens = param.split('.') | |
result = object | |
if status | |
tokens.each do |t| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.gem "acts-as-taggable-on", :source => "http://gemcutter.org", :version => '2.0.0.rc1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/person.rb | |
class Person < ActiveResource::Base | |
self.site = "http://api.oauth_protected_site.com" | |
end | |
# controller | |
@people = Person.find(:all) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Para pasar la salida de recordmydesktop a avi | |
mencoder $1 -o $2 -nosound -ovc lavc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validates_uniqueness_of :dni, :allow_nil => true, :allow_blank=>true, :message=>I18n.t('persona.dni_already_exists') | |
validates_uniqueness_of :dni, :scope=>[:nombres, :apellidos], :allow_nil => true, :message=>I18n.t('persona.person_already_exists') |
NewerOlder