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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Plantilla Bootstrap 101</title> | |
<!-- Bootstrap --> | |
<link href="css/bootstrap.min.css" rel="stylesheet"> |
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
#nota1 = 13 | |
#nota2 = 15 | |
#nota3 = 20 | |
#nota4 = 4 | |
#nota5 = 8 | |
notas = [13,15,20,4,8] | |
#for i in 0...notas.length | |
# puts 1 + notas[i] |
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 Users::RegistrationsController < Devise::RegistrationsController | |
before_filter :configure_permitted_parameters | |
def create | |
build_resource(sign_up_params) | |
resource.save | |
yield resource if block_given? |
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
((title,bodyText) => { | |
var div = document.createElement("div"); | |
div.className = "entry"; | |
var h1 = document.createElement("h1"); | |
var textH1 = document.createTextNode(title); | |
h1.appendChild(textH1); | |
var innerDiv = document.createElement("div"); | |
innerDiv.className = "body"; |
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
<div id="entries"></div> | |
<script id="entry-template" type="text/x-handlebars-template"> | |
<div class="entry"> | |
<h1>{{title}}</h1> | |
<div class="body"> | |
{{body}} | |
</div> | |
</div> | |
</script> |
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
(() => { | |
//Compile | |
var source = $('#entry-template').html(); | |
var template = Handlebars.compile(source); | |
//Get data | |
var context = {title: "My New Post", body: "This is my first post!"}; | |
var context2 = {title: "Another Post", body: "This is another post!"}; | |
//Create HTML elements |
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
<div id="entries"> | |
<div class="entry"> | |
<h1>My New Posty</h1> | |
<div class="body"> | |
This is my first post! | |
</div> | |
</div> | |
<div class="entry"> | |
<h1>Another Post</h1> | |
<div class="body"> |
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
var template = '<div class="entry">{{entryBody}}</div>'; |
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
<script id="myTemplate" type="text/x-handlebars-template"> | |
<h1>{{title}}</h1> | |
<ul> | |
{{#names}} | |
<li>{{name}}</li> | |
{{/names}} | |
</ul> | |
</script> |
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
console.log('Primero'); | |
console.log('Segundo'); | |
console.log('Tercero'); |
OlderNewer