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
$(document).ready (function(){ | |
$(".btn-ingresar").click(function(){ | |
var login = $("#login"); | |
var password= $("#password"); | |
if (login.val() == "Usuario1" && password.val() == "Password1"){ | |
location.href = "Pages/index.html"; | |
} | |
else{ | |
window.alert('El usuario o la contraseña ingresados son incorrectos.'); | |
} |
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
<li class="date <%= 'inactive' if day.expired? %>"> | |
<h1> | |
<%= day.date.strftime('%a, %d') %> | |
<% if selectable_day? day %> | |
<button type="button" class="btn btn-primary btn-sm my-btn" | |
data-at="<%= day.date %>" title="Nuevo turno"> | |
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | |
<span class="sr-only">Nuevo turno</span> | |
</button> |
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
<p id="notice"><%= notice %></p> | |
<table style="width:100%"> | |
<tr> | |
<td><h1><%= @turn.employee %></td> | |
<td><h1><%= @turn.at %></td> | |
</tr> | |
<% @turn.visits.each do |visit| %> | |
<tr> | |
<td><%= visit.client.address %></td> |
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
class CreateZones < ActiveRecord::Migration | |
def change | |
create_table :zones do |t| | |
t.string :name | |
t.boolean :out_of_zone | |
t.timestamps null: false | |
end | |
add_column :clients, :zone_id, :integer | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Muebleria</title> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A==" crossorigin="anonymous"></script> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | |
<%= csrf_meta_tags %> | |
</head> |
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
require 'test_helper' | |
class ClientsControllerTest < ActionController::TestCase | |
test "update existing client" do | |
john = clients :john | |
put :update, dni: john.dni, client: {name: 'pepe'} | |
assert john.reload.name == 'pepe' | |
end | |
test "unexisting client" 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
#!/usr/bin/env ruby | |
gem 'minitest', '>= 5.0.0' | |
require 'minitest/autorun' | |
require_relative 'princess' | |
require 'pry' | |
class ArrayTest < Minitest::Test | |
def test_princess_play | |
assert_output('You are knocked from the round.') { Princess.play } |