This file contains 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
def date=(date) | |
write_attribute(:date, date.gsub(/(\d{4})\/(\d{2})\/(\d{2})/, "#{$3}/#{$2}/#{$1}")) | |
end |
This file contains 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
apt-get install build-essential zlib1g-dev libssl-dev libreadline5-dev | |
sudo apt-get install ruby-full libmysql-ruby librmagick-ruby build-essential | |
apt-get install git-core | |
wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz |
This file contains 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
#antes: | |
Factory.define :bunch , :class => Bunch do |f| | |
f.ribbon_color_id 1 | |
f.production_unit_id 1 | |
f.release "2011-01-12 22:37:49" | |
f.user_id 1 | |
end | |
Factory.define :lot, :class => :Lot do |f| | |
f.production_unit_id 1 |
This file contains 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
#bunch.rb | |
Factory.define :bunch , :class => Bunch do |f| | |
f.ribbon_color {|ribbon_color|ribbon_color.association(:ribbon_color) } | |
f.date "2011-01-12 22:37:49" | |
f.user_id 1 | |
f.after_build { |f| | |
f.bunch_lots << Factory.build(:bunch_lot) | |
} | |
end | |
Factory.define :lot, :class => Lot do |f| |
This file contains 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
$(".radioTag").bind("ready load change",function(){ | |
if ($("input[@name='rdio']:checked").val() == 'fisica'){ | |
$("#fisica").show(); | |
$("#juridica").hide(); | |
}else if ($("input[@name='rdio']:checked").val() == 'juridica'){ | |
$("#fisica").hide(); | |
$("#juridica").show(); | |
} | |
}); |
This file contains 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
#encoding: utf-8 | |
require 'acceptance/acceptance_helper' | |
include HelperMethods | |
feature "Marcando Consulta", %Q{ | |
como um atendente | |
} do | |
before(:each) do | |
This file contains 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
#!/usr/bin/env bash | |
ruby_string="1.9.2" | |
gemset_name="egenda" | |
if rvm list strings | grep -q "${ruby_string}" ; then | |
# Load or create the specified environment | |
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \ | |
&& -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then |
This file contains 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
$(function(){ | |
var _new_li = new String(); | |
var _element = new Object(); | |
$( "#draggable > li" ).draggable({ revert: true }); | |
$( "#droppable").droppable({ | |
accept: "#draggable > li", | |
drop: function(event, ui){ | |
console.log(ui); | |
_new_li = $('<li>'+ui.draggable.context.innerHTML+'<input name="campaign[employee_ids][]" type="hidden" value="'+ui.draggable.context.id+'" /> <span><img src="/assets/cancel.jpg" alt="Remover" title="Remover"></span></li>') |
This file contains 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
#encoding: utf-8 | |
module Atendente::AgendaHelper | |
def calendar(options={}, &block) | |
options = { | |
:events => nil, | |
:field => :created_at, | |
:header_format => :week, | |
:id => "calendar", | |
:month => Date.today.month, | |
:today => nil, |
This file contains 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
development: | |
adapter: postgresql | |
encoding: utf8 | |
database: egenda_development | |
username: ruby | |
password: ruby | |
production: | |
adapter: postgresql | |
encoding: utf8 |
OlderNewer