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
require "cancan/matchers" | |
require 'spec_helper' | |
describe "User" do | |
describe "Ability" do | |
subject(:ability){ Ability.new(user) } | |
let(:user){ 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
# Read about factories at https://github.com/thoughtbot/factory_girl | |
FactoryGirl.define do | |
factory :user do |f| | |
f.name "Alessandro" | |
f.username "alessandrocb" | |
f.matricula "123456789" | |
f.password "123456789" | |
f.password_confirmation "123456789" | |
f.after(:create) {|user| user.add_role(:student)} |
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
class CreateConvenios < ActiveRecord::Migration | |
def change | |
create_table :convenios do |t| | |
t.string :numeroconvenio | |
t.string :uf | |
t.string :codigosiafi | |
t.string :nomemunicipio | |
t.string :situacaoconvenio | |
t.string :numerooriginal | |
t.string :objetoconvenio |
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
private | |
# Use callbacks to share common setup or constraints between actions. | |
def set_convenio | |
@convenio = Convenio.find(params[:id]) | |
end | |
# Never trust parameters from the scary internet, only allow the white list through. | |
def convenio_params | |
params.require(:convenio).permit(:numeroconvenio, :uf, :codigosiafi, :nomemunicipio, :situacaoconvenio, :numerooriginal, :objetoconvenio, :codigoorgaosuperior, :nomeorgaosuperior, :codigoconcedente, :nomeconcedente, :codigoconvenente, :nomeconvenente, :tipoenteconvenente, :valorconvenio, :valorliberado, :datapublicacao, :datainiciovigencia, :datafimvigencia, :valorcontrapartida, :dataultimaliberacao, :valorultimaliberacao) |
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
<h1>Listing convenios</h1> | |
<table> | |
<thead> | |
<tr> | |
<th>Numeroconvenio</th> | |
<th>Uf</th> | |
<th>Codigosiafi</th> | |
<th>Nomemunicipio</th> | |
<th>Situacaoconvenio</th> |
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
<h1>Lista de Usuários</h1> | |
<table > | |
<thead> | |
<tr> | |
<td>Nome</td> | |
<td>Cpf</td> | |
<td>Email</td> | |
<td>Editar usuário</td> | |
<td>Deletar usuário</td> |
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
<%= simple_form_for @usuarios do |f| %> | |
<%= f.input :nome, input_html: { class: 'special' } %> | |
<%= f.input :cpf, input_html: { maxlength: 11 } %> | |
<%= f.input :email %> | |
<%= f.input :login, input_html: { maxlength: 20 } %> | |
<%= f.input :senha, input_html: { maxlength: 12 } %> | |
<%=link_to raw("<i class=\"fa fa-plus-circle\"> Voltar "), | |
usuarios_path, |
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
<%= form_tag directories_path, method: :post do %> | |
<div class="field"> | |
<%= label_tag "Login"%> | |
<%= text_field_tag 'login', nil,:required => true %> | |
</div> | |
<div class="field"> | |
<%= label_tag "Nome"%> | |
<%= text_field_tag 'nome' , nil ,:required => true%> |
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
Referências: | |
http://rogerdudler.github.io/git-guide/index.pt_BR.html | |
http://blog.glaucocustodio.com/2013/03/06/git-nosso-de-cada-dia-git-cheatsheet/ | |
http://git-scm.com/book/pt-br/ | |
Treine: | |
https://try.github.io/levels/1/challenges/1 | |
http://games.vidageek.net/play/git |
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
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
int main() { | |
double entrada,valor; | |
double cem =0 ,cinquenta = 0 ,vinte = 0,dez = 0,cinco = 0,dois = 0,um = 0,m50 = 0 , m25=0,m10=0,m5=0,m1=0; | |
int end = 0; |
OlderNewer