Skip to content

Instantly share code, notes, and snippets.

//global scope
function someFunc(x, y, z) {
// .....
var someEventHandler = function(a, b, c) {
//.....
}
// .....
var someEl = document.getElementById('myButton');
someEl.onclick = someEventHandler(x, y, z);
<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 %>
@kryss88ltj
kryss88ltj / seeds.rb
Created March 23, 2014 00:13
seeds.db
require 'faker'
# Create 15 topics
topics = []
15.times do
topics << Topic.create(
name: Faker::Lorem.sentence,
description: Faker::Lorem.paragraph
)
end