Finally, Simple Form support Boostrap 3. 👏
But I found it still dosen't support some components in Bootstrap 3. Or may be in the future. But I can't wait, so I find a solution to support them. It was inspired by heartcombo/simple_form#531 (comment) .
This is a final solution and I used in my project.
require 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
describe "GET #index" do | |
#describe "POST #create" do | |
#describe "GET #show" do | |
#describe "PATCH #update" do (or PUT #update) | |
#describe "DELETE #destroy" do | |
#describe "GET #new" do |
_ _ .~-, | |
| | | | .' `,> | |
__| | ___ __ _| | .D' ,> <7`, | |
/ _` |/ _ \/ _` | | ,` | ,> <7 } | |
| (_| | __/ (_| | | { D !> <7 / | |
\__,_|\___|\__,_|_| { / j_7` ! | |
_ _ _ _ _ : / j' | |
(_) | | | (_) | `, ] | |
__ ___| |_| |__ _| |_ F } | |
\ \ /\ / / | __| '_ \ | | __| F , { |
My notes from implementing Job Vranish's excellent guide.
Follow along with the guide above, getting rustc from rustup or similar:
rustc 1.0.0-nightly (dcaeb6aa2 2015-01-18 11:28:53 +0000)
binary: rustc
commit-hash: dcaeb6aa23ecba2dc2af870668a9239136d20fa3
commit-date: 2015-01-18 11:28:53 +0000
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
# Other syntax without patch | |
STUDENT_LEVELS = { | |
freshman: Student::Underclassman, | |
sophomore: Student::Underclassman, | |
junior: Student::Upperclassman, | |
senior: Student::Upperclassman, | |
graduate: Student::Graduate | |
}.tap { |h| h.default = Student::Unregistered } | |
import random | |
import string | |
# -*- coding: utf-8 -*- | |
def randomname(length = 6): | |
vowels = ['a','e','i','o','u',''] | |
consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'] | |
a = random.sample(consonants,length/2) | |
x = 1 |
// http://generateme.tumblr.com | |
// Harmonograph with noise | |
// space - save | |
// click - change | |
float time; | |
float f1,f2,f3,f4; | |
float p1,p2,p3,p4; | |
float a1,a2,a3,a4; |