Skip to content

Instantly share code, notes, and snippets.

View carlesjove's full-sized avatar

Carles Jove i Buxeda carlesjove

View GitHub Profile
# Devise 3.1.0
ca:
devise:
confirmations:
confirmed: "El teu compte ha estat confirmat correctament. Si us plau, inicia la sessió."
confirmed_and_signed_in: "El teu compte ha estat confirmat correctament. S'ha iniciat la sessió."
send_instructions: 'En breu rebràs un correu electrònic amb instruccions sobre com confirmar el teu compte.'
send_paranoid_instructions: "Si la teva adreça electrònica existeix a la base de dades, rebràs un correu electrònic amb instruccions sobre com confirmar el teu compte."
failure:
@carlesjove
carlesjove / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@carlesjove
carlesjove / capybara cheat sheet
Created September 14, 2016 20:26 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@carlesjove
carlesjove / rspec.rb
Created March 22, 2018 07:04 — forked from 5minpause/rspec.rb
how to use sessions with capybara
# support/setup.rb
def in_browser(name)
old_session = Capybara.session_name
Capybara.session_name = name
yield
ensure
Capybara.session_name = old_session
end
@carlesjove
carlesjove / hashquiz.rb
Created June 29, 2019 16:47 — forked from potatosalad/hashquiz.rb
Ruby quiz for convert hash "dot paths" into actual hash hierarchy.
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
end
end