I hereby claim:
- I am padde on github.
- I am padde (https://keybase.io/padde) on keybase.
- I have a public key whose fingerprint is 7B8E 3327 8E52 E3E1 8392 92AE CCBB 382F 5F9D 1786
To claim this, I am signing this object:
{ | |
"hello": "world" | |
} |
SELECT * FROM posts WHERE body ILIKE '%zweitag%' |
SELECT to_tsvector('I like to go swimming'); | |
-------------------------- | |
'go':4 'like':2 'swim':5 |
SELECT to_tsvector('Ich würde gerne schwimmen gehen'); | |
---------------------------------------------------- | |
'gehen':5 'gern':3 'ich':1 'schwimmen':4 'würde':2 |
SELECT to_tsvector('german', 'Ich würde gerne schwimmen gehen'); | |
------------------------------ | |
'geh':5 'gern':3 'schwimm':4 |
class Post < ActiveRecord::Base | |
include PgSearch | |
pg_search_scope :search, | |
against: :body, | |
using: {tsearch: {dictionary: 'german'}} | |
end |
require 'forwardable' | |
class Proc | |
def with(*arguments, &block) | |
proc do |*remaining_arguments| | |
call(*remaining_arguments, *arguments, &block) | |
end | |
end | |
end |
# spec/support/devise.rb | |
module DeviseFeatureHelpers | |
def sign_in(user = nil, scope = :user) | |
user ||= build_stubbed :user | |
login_as user, scope: scope | |
end | |
end | |
RSpec.configure do |config| |
defmodule Regex.InterpolationError do | |
defexception [:message] | |
end | |
defmodule Regex.Interpolation do | |
def wrap(regex = %Regex{opts: modifiers}) do | |
Regex.source(regex) | |
|> do_wrap(modifiers) | |
end |
I hereby claim:
To claim this, I am signing this object: