Skip to content

Instantly share code, notes, and snippets.

def self.render_block(path)
url = path.gsub('http://localhost:3000/', '/')
mask = '*'
blocks = []
Block.where('address Like ?', "%#{mask}").each do |block|
blocks << block.html_block if url.match(block.address)
end
Block.where('address Like ?', url).each do |block|
blocks << block.html_block
@povodok
povodok / task.rb
Last active February 15, 2018 20:58
require 'uri'
require 'net/http'
require 'json'
class UpdatesIssuesNotifierListener < Redmine::Hook::Listener
CALLBACK_URL = 'https://localhost:3333'.freeze
def controller_issues_edit_after_save(context)
data = {
'issueid' => context[:issue].id,