Skip to content

Instantly share code, notes, and snippets.

View gambala's full-sized avatar
🟢
Online

Vitaliy Emeliyantsev gambala

🟢
Online
View GitHub Profile
@mike-bhs
mike-bhs / polymorphic_following.md
Last active February 1, 2018 20:40
Polymorphic following without dependencies on objects that are followed

##Polymorphic following without dependencies on objects that are followed followable_concern.rb

module FollowableConcern
  extend ActiveSupport::Concern

  included do
    has_many :personal_followers, class_name: 'Core::Follow', as: :followingable, dependent: :destroy
    has_many :personal_followings, class_name: 'Core::Follow', as: :followerable, dependent: :destroy
@kryzhovnik
kryzhovnik / routes.rb
Created May 22, 2015 15:34
Интеграция Яндекс.Кассы с Rails
# config/routes.rb
YandexKassaIntegration::Application.routes.draw do
# ...
scope '/yandex_kassa' do
controller 'yandex_kassa', constraints: { subdomain: 'ssl' } do
post :check
post :aviso
get :success
get :fail
@pboling
pboling / Gemfile
Last active March 1, 2022 10:18
My latest project's Gemfile, implements bundle group pattern
source 'https://rubygems.org'
# Follows the bundler group pattern described here:
# http://iain.nl/getting-the-most-out-of-bundler-groups
# Gemfile.mine in root dir allows locally custom gems.
# NOTE: Doing this will change the Gemfile.lock - commit with care.
eval File.read(File.join(File.dirname(__FILE__), 'Gemfile.mine')) if File.exists? File.join(File.dirname(__FILE__), 'Gemfile.mine')
ruby '1.9.3'