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
//global scope | |
function someFunc(x, y, z) { | |
// ..... | |
var someEventHandler = function(a, b, c) { | |
//..... | |
} | |
// ..... | |
var someEl = document.getElementById('myButton'); | |
someEl.onclick = someEventHandler(x, y, z); |
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
<h2>Edit <%= resource_name.to_s.humanize %></h2> | |
<div class="row"> | |
<div class="col-md-8"> | |
<h3>Change email or password</h3> | |
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :patch }) do |f| %> | |
<%= devise_error_messages! %> | |
<div class="form-group"> | |
<%= f.label :email %> |
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 'faker' | |
# Create 15 topics | |
topics = [] | |
15.times do | |
topics << Topic.create( | |
name: Faker::Lorem.sentence, | |
description: Faker::Lorem.paragraph | |
) | |
end |