Skip to content

Instantly share code, notes, and snippets.

@leastbad
leastbad / action_mailbox.md
Last active August 5, 2024 21:10
Action Mailbox: The Missing Manual

This is all you really need to know in order to make Action Mailbox work in development.

  1. Fire up ngrok http 3000 and make note of your subdomain for steps 3 and 8.
  2. Create a Mailgun account because they offer sandbox addresses; grab your domain from the Dashboard.
  3. Go into Receiving and create a catch-all route pointing to: https://XXX.ngrok.io/rails/action_mailbox/mailgun/inbound_emails/mime
  4. Add your Mailgun API key to your credentials:
action_mailbox:
 mailgun_api_key: API KEY HERE
@ck3g
ck3g / autocomplite.css.scss
Last active May 29, 2020 18:02
Twitter bootstrap + rails3-jquery-autocomplete gem styles
ul.ui-autocomplete {
margin-top: 2px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
@jswanner
jswanner / nulls_last.rb
Created September 13, 2012 20:03
ActiveRecord Postgres Nulls Last
ActiveSupport.on_load(:active_record) do
module Arel::NullsLastPredications
def nulls_last
Arel::Nodes::NullsLast.new self
end
end
module Arel::Nodes
class NullsLast < Unary
def gsub *args
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
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')