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
| context "should validate presence of country fields if country not equal BRASIL" do | |
| before do | |
| Country.stub!(:find).with(2).and_return({:id => 2, :name => "ARGENTINA",:created_at => Time.now , :updated_at => Time.now}) | |
| end | |
| it { should validate_presence_of :year_of_arrival } | |
| it { should validate_presence_of :passport } | |
| it { should validate_presence_of :type_visa } | |
| it { should validate_presence_of :validity_visa } | |
| end |
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
| (function($) { | |
| $.fn.poll = function(options){ | |
| var $this = $(this); | |
| var opts = $.extend({}, $.fn.poll.defaults, options); | |
| setInterval(update, opts.interval); | |
| function update(){ | |
| $.ajax({ | |
| type: opts.type, |
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
| //Controller | |
| <?php | |
| class BannersController extends AppController { | |
| var $name = 'Banners'; | |
| var $uses = array('Banner'); | |
| var $paginate = array(); |
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
| #encoding: utf-8 | |
| module Atendente::AgendaHelper | |
| def calendar(options={}, &block) | |
| caption = String.new | |
| contents = String.new | |
| head = String.new | |
| rows = String.new | |
| options = { |
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
| development: | |
| adapter: postgresql | |
| encoding: utf8 | |
| database: egenda_development | |
| username: ruby | |
| password: ruby | |
| production: | |
| adapter: postgresql | |
| encoding: utf8 |
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
| #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 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
| $(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 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
| #!/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 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
| #encoding: utf-8 | |
| require 'acceptance/acceptance_helper' | |
| include HelperMethods | |
| feature "Marcando Consulta", %Q{ | |
| como um atendente | |
| } do | |
| before(:each) do | |
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
| $(".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(); | |
| } | |
| }); |