Skip to content

Instantly share code, notes, and snippets.

View zeitan's full-sized avatar

Antonio Bastardo zeitan

View GitHub Profile
results
=> [#<Result id: 3, match_id: 3, team_id: nil, goals: 5, created_at: "2010-04-14 18:48:41", updated_at: "2010-04-14 18:48:41">, #<Result id: 4, match_id: 3, team_id: nil, goals: 7, created_at: "2010-04-14 18:48:41", updated_at: "2010-04-14 18:48:41">, #<Result id: nil, match_id: 3, team_id: 2, goals: 0, created_at: nil, updated_at: nil>, #<Result id: nil, match_id: 3, team_id: 1, goals: 0, created_at: nil, updated_at: nil>]
<% form_for @person do |person_form| %>
<%= person_form.label :name %>
<%= person_form.text_field :name %>
<% person_form.fields_for :children do |child_form| %>
<%= child_form.label :name %>
<%= child_form.text_field :name %>
ruby-1.8.7-p352@SSABA:
system:
uname: "Linux ba-2027l 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:09:46 UTC 2011 i686 GNU/Linux"
bash: "/bin/bash => GNU bash, versión 4.1.5(1)-release (i486-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.7.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"
_form.html.erb
<% fields_for :embargos,i=0 do |f| %>
<%= render :partial => 'cargafamiliarembargos', :locals => {:form_embargo => f,:data=>@embargos[i]} %>
<%i=i.next%>
<% end %>
_cargafamiliarembargos.html.erb
<tr >
<td><%=h data.NombreTrabajador %></td>
<td><%=h data.NombreMenor %></td>
@zeitan
zeitan / boostrap.css
Created February 13, 2012 18:17
CSS boostrap
.carousel .active {
left: 0;
}
bootstrap.css (línea 3267)
.carousel .active, .carousel .next, .carousel .prev {
display: block;
}
bootstrap.css (línea 3264)
.carousel .item {
-moz-transition: left 0.6s ease-in-out 0s;
@zeitan
zeitan / Instalacion.txt
Created March 15, 2012 17:02
Como instalar rvm+nginx+passenger+php en debian squeeze
Instalar RVM como root
# echo 'export rvm_prefix="$HOME"' > /root/.rvmrc
# echo 'export rvm_path="$HOME/.rvm"' >> /root/.rvmrc
# bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# type rvm | head -1
# rvm requirements
Instalamos lo que haga falta
@zeitan
zeitan / gist:2152091
Created March 21, 2012 19:55
Product.rb
#Product es la representacion logica de un producto dentro de la BD de allihay, son estos a los que se les hace chekin, pertenecen a alguna categoria y pueden tener atributos via la tabla de Product_Characteristics
# t.string "name", :null => false
# t.integer "category_id"
# t.datetime "created_at"
# t.datetime "updated_at"
#
#Implementa las siguientes validaciones
# validates :name, :presence => true, :uniqueness => { :case_sensitive => false }, :allow_blank => false
# validate :category_should_exists
#
json.(collection, :id, :name)
My object: --- !ruby/object:User
attributes:
created_at: 2011-08-24 19:57:55.027023
estado_id: "1"
last_sign_in_ip: 127.0.0.1
updated_at: 2012-08-15 11:57:25.684891 -04:30
last_sign_in_at: 2012-08-15T09:44:13+00:00
id: 30018076
sign_in_count: 59
remember_token:
paradas[0].tiempoparada.public_methods
=> ["upcase!", "zip", "iseuc", "b64encode", "require_dependency", "find_index", "to_d", "between?", "copy_instance_variables_from", "to_f", "minmax", "lines", "methods", "send", "sub", "require_library_or_gem", "to_json_raw", "returning", "replace", "acts_like?", "humanize", "empty?", "group_by", "squeeze", "taint", "to_enum", "instance_variable_defined?", "crypt", "gsub!", "pluralize", "issjis", "html_safe?", "to_time", "match", "downcase!", "take", "find_all", "each_with_object", "min_by", "bytes", "tojis", "singleton_methods", "instance_eval", "entries", "gsub", "last", "to_str", "squish", "to_json_raw_object", "extended_by", "first", "is_utf8?", "enum_for", "duplicable?", "chop!", "intern", "ord", "enable_warnings", "nil?", "require_or_load", "succ", "capitalize!", "take_while", "isutf8", "select", "index_by", "max_by", "chars", "tosjis", "protected_methods", "instance_exec", "tr!", "sort", "chop", "tainted?", "dump", "extend_with_included_modules_from", "include?",