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
// | |
// ViewController.swift | |
// spiner-alert | |
// | |
// Created by Angelito Rojas on 25/10/14. | |
// Copyright (c) 2014 Angelito Rojas. All rights reserved. | |
// | |
import UIKit |
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
// | |
// ViewController.swift | |
// spiner-alert | |
// | |
// Created by Angelito Rojas on 25/10/14. | |
// Copyright (c) 2014 Angelito Rojas. All rights reserved. | |
// | |
import UIKit |
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
// | |
// ViewController.swift | |
// | |
// Created by Angelito Rojas on 25/10/14. | |
// Copyright (c) 2014 Angelito Rojas. All rights reserved. | |
// | |
import UIKit |
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
Block Load (0.5ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."project_id" = 33 ORDER BY name | |
Unit Load (5.8ms) SELECT "units".* FROM "units" WHERE "units"."project_id" = 33 ORDER BY id | |
PriceList Load (0.8ms) SELECT "price_lists".* FROM "price_lists" WHERE "price_lists"."project_id" = 33 AND (price_list_status = 'approved') ORDER BY created_at DESC LIMIT 1 | |
UnitPrice Load (1.6ms) SELECT "unit_prices".* FROM "unit_prices" WHERE "unit_prices"."price_list_id" = 145 | |
Rendered price_lists/new.html.haml within layouts/application (1417.6ms) |
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
<!DOCTYPE html> | |
<html> | |
<!-- | |
Created using jsbin.com | |
Source can be edited via http://jsbin.com/dusuhoju/3/edit | |
--> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Yet Another DataTables Column Filter (Yadcf) Showcase</title> |
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
- show ||= 'cards' | |
- if show == 'list' | |
= div_for user, class: 'user-list' do | |
.user-description | |
.user-avatar | |
= avatar(user, class: "user-img") | |
.user-info | |
= link_to user.name, "", class: "name" | |
%p.role= user.role_name |
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
#lib/startup_constraint.rb | |
class StartupConstraint | |
def matches?(request) | |
id = request.path.gsub("/", "") | |
Startup.find_by_slug(id) | |
end | |
end | |
#lib/user_constraint.rb | |
class UserConstraint |
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 Newsletter < ActiveRecord::Base | |
def deliver | |
sleep 5 # simulate long newsletter delivery | |
update_attribute(:delivered_at, Time.zone.now) | |
end | |
handle_asynchronously :deliver | |
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
= simple_form_for(@couple, url: save_family_clients_url, html: { multipart: true, id: 'form_modal_family', novalidate: true}, remote: true) do |f| | |
.head-modal | |
%p Asignacion de pareja | |
.body-modal.scroll-wrapp | |
= hidden_field_tag "parent", @parent.id | |
- if @parent.marital_status == 'M' | |
%fieldset | |
%legend Régimen de Propiedad | |
= f.input :married_regimen do | |
= f.select :married_regimen, [['Bienes Mancomunados', Client::REGIMENS[:community_property]], ['Bienes Separados', Client::REGIMENS[:separate_property]]] |
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 | |
def credito(monto, tasa, nombre, ruc) | |
puts "El monto maximo sera de " + monto.to_s | |
puts "La tasa sera de " + tasa.to_s | |
puts nombre | |
puts ruc | |
end | |
puts "Ingrese la razón social" | |
nombre = gets.chomp |