This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT | |
remote: [email protected]:storuky/carrierwave-crop.git | |
revision: 8c5a446eda9eeedc20a7a6668744e7f41db4f0cd | |
branch: master | |
specs: | |
carrierwave-crop (0.1.2) | |
carrierwave | |
jquery-rails | |
rails (>= 3.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('lightbox', ['$compile', '$timeout', '$rootScope', 'Image', function($compile, $timeout, $rootScope, Image) { | |
// Runs during compile | |
return { | |
// name: '', | |
// priority: 1, | |
// terminal: true, | |
scope: { | |
images: "=", | |
allowDestroy: "=", | |
upload: "=" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sidekiq::Middleware::DefaultUrlOptions | |
class Client | |
def call(worker_class, msg, queue, redis_pool) | |
msg['default_url_options'] = ActionMailer::Base.default_url_options | |
yield | |
end | |
end | |
class Server | |
def call(worker, msg, queue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cacheable | |
extend ActiveSupport::Concern | |
included do | |
after_commit :clear_cache | |
private | |
def clear_cache | |
Rails.cache.delete_matched(/#{self.class.to_s}\.cache\.all/) | |
Rails.cache.delete_matched(/#{self.class.to_s}\.cache\.find\(#{self.id}\)/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('clickOutside', ['$document', function ($document) { | |
return { | |
restrict: 'A', | |
scope: { | |
clickOutside: '&' | |
}, | |
link: function (scope, el, attr) { | |
var handler = function (e) { | |
if (el !== e.target && !el[0].contains(e.target) && document.body.contains(e.target)) { | |
scope.$apply(function () { |
NewerOlder