This file contains 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
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 |
This file contains 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
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, |