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
AllCops: | |
Include: | |
- '**/Rakefile' | |
- '**/config.ru' | |
Exclude: | |
- 'db/**/*' | |
- 'config/**/*' | |
- 'script/**/*' | |
- 'bin/**/*' | |
- !ruby/regexp /old_and_unused\.rb$/ |
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
# ... | |
gem 'carrierwave' | |
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL |
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
POST /ws_horarios/atualizaEscala HTTP/1.1 | |
Host: www.myexternalserver.com.br | |
Accept: */* | |
Content-Length: 14995 | |
Content-Type: application/x-www-form-urlencoded | |
Expect: 100-continue | |
empresa=f3d15ee????????50ca575fa930ce9d&func%5Fescala=%5B%7B%22matricula%22%3A%22100006%22%2C%22data%5Finicio%22%3A%2201042013%22%2C%22data%5Ffim%22%3A%2207042013%22%2C%22jornadas%22%3A%5B%7B%22converter%5Fhora%5Ff%22%3A%22Horas%20A%20Menos%22%2C%22converter%5Fhora%5Fe%22%3A%22Horas%20Excedentes%22%2C%22intervalos%22%3A%5B%7B%22inicio%22%3A%221730%22%2C%22fim%22%3A%221815%22%2C%22nome%22%3A%22Tutoria%20P%5Cu00f3s%2DGradua%5Cu00e7%5Cu00e3o%20a%20Dist%5Cu00e2ncia%22%7D%5D%2C%22batidas%5Fpre%22%3A%5B%5D%7D%2C%7B%22converter%5Fhora%5Ff%22%3A%22Horas%20A%20Menos%22%2C%22converter%5Fhora%5Fe%22%3A%22Horas%20Excedentes%22%2C%22intervalos%22%3A%5B%7B%22inicio%22%3A%221300%22%2C%22fim%22%3A%221400%22%2C%22nome%22%3A%22Assist%2E%2FCoordena%5Cu00e7%5Cu00e3o%20Projetos%22%7D%5D%2C%22batidas%5Fpre%22%3A%5B%5D%7D%2C%7B%22converter%5Fhora%5Ff%22%3 |
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
opening connection to www.myexternalserver.com.br... | |
opened | |
<- "POST /ws_horarios/atualizaEscala?empresa=f3d15e???????????50ca575fa930ce9d&func_escala=%5B%7B%22matricula%22%3A%22100022%22%2C%22data_inicio%22%3A%2201042013%22%2C%22data_fim%22%3A%2207042013%22%2C%22jornadas%22%3A%5B%7B%22converter_hora_f%22%3A%22Horas%20A%20Menos%22%2C%22converter_hora_e%22%3A%22Horas%20Excedentes%22%2C%22intervalos%22%3A%5B%7B%22inicio%22%3A%220800%22%2C%22fim%22%3A%221200%22%2C%22nome%22%3A%22Supervis%5Cu00e3o%20de%20Est%5Cu00e1gio%22%7D%2C%7B%22inicio%22%3A%221300%22%2C%22fim%22%3A%221700%22%2C%22nome%22%3A%22Supervis%5Cu00e3o%20de%20Est%5Cu00e1gio%22%7D%5D%2C%22batidas_pre%22%3A%5B%5D%7D%2C%7B%22converter_hora_f%22%3A%22Horas%20A%20Menos%22%2C%22converter_hora_e%22%3A%22Horas%20Excedentes%22%2C%22intervalos%22%3A%5B%7B%22inicio%22%3A%221400%22%2C%22fim%22%3A%221800%22%2C%22nome%22%3A%22Supervis%5Cu00e3o%20de%20Est%5Cu00e1gio%22%7D%2C%7B%22inicio%22%3A%221920%22%2C%22fim%22%3A%222005%22%2C%22nome%22%3A%22Aulas%20Gradua%5Cu00 |
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
[ | |
{ | |
"matricula": "100006", | |
"data_inicio": "01042013", | |
"data_fim": "07042013", | |
"jornadas": [ | |
{ | |
"converter_hora_f": "Horas A Menos", | |
"converter_hora_e": "Horas Excedentes", | |
"intervalos": [ |
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
[ | |
{ | |
"matricula": "100022", | |
"data_inicio": "01042013", | |
"data_fim": "07042013", | |
"jornadas": [ | |
{ | |
"converter_hora_f": "Horas A Menos", | |
"converter_hora_e": "Horas Excedentes", | |
"intervalos": [ |
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
@pdf = Prawn::Document.new(:margin => 0, :skip_page_creation => true) | |
images.each do |imagem| | |
geo = Paperclip::Geometry.from_file(imagem) | |
if geo.height >= geo.width | |
size = [612, 792] | |
@pdf.start_new_page(:page_size => "A4", :layout => :portrait) | |
else | |
size = [792, 612] | |
@pdf.start_new_page(:page_size => "A4", :layout => :landscape) | |
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
#encoding: utf-8 | |
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
user.perfis.each do |perfil| | |
perfil.permissoes_perfis.each do |permissao| | |
can permissao.acao.to_sym, Recurso.por_tipo(permissao.recurso, permissao.tipo) | |
end | |
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
#encoding: utf-8 | |
class ContatoMailer < ActionMailer::Base | |
def receive(message) | |
p message | |
end | |
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
# modo um | |
def index | |
@status = params[:status] | |
if @status == nil | |
@associados = Associado.all | |
else | |
@associados = Associado.find_all_by_status(@status) | |
end | |
respond_to do |format| |