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
class JournalObserver < ActiveRecord::Observer | |
def after_create(journal) | |
if Setting.notified_events.include?('issue_updated') || | |
(Setting.notified_events.include?('issue_note_added') && journal.notes.present?) || | |
(Setting.notified_events.include?('issue_status_updated') && journal.new_status.present?) || | |
(Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?) | |
Mailer.deliver_issue_edit(journal) | |
end | |
end | |
end |
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
$ ls -1 vendor/plugins/ | |
action_mailer_optional_tls | |
acts_as_activity_provider | |
acts_as_attachable | |
acts_as_customizable | |
acts_as_event | |
acts_as_list | |
acts_as_searchable | |
acts_as_tree | |
acts_as_versioned |
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
# Edit the config file list so | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = true | |
[remote "origin"] | |
mirror = true | |
url = git://github.com/edavis10/redmine.git | |
fetch = +refs/*:refs/* |
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
#!/usr/bin/env ruby | |
# Usage: | |
# ruby plugin_to_gem.rb my_plugin_directory | |
require 'fileutils' | |
@plugin_dir = ARGV[0] | |
@plugin_name = ARGV[0] | |
def rakefile_content | |
description = 'TODO' |
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
# Redmine menu that calls a JavaScript function | |
Redmine::MenuManager.map :project_menu do |menu| | |
menu.push :javascript, { :controller => 'projects', :action => 'show' }, {:html => {:onclick => 'alert("hi"); return false;', :id => 'f'}} | |
end |
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 PatchingProjectForEirikb | |
def self.included(base) # :nodoc: | |
base.send(:include, InstanceMethods) | |
# Same as typing in the class | |
base.class_eval do | |
unloadable # Send unloadable so it will not be unloaded in development | |
after_save :do_something | |
end |
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
class DefaultAssignProjectHook < Redmine::Hook::ViewListener | |
# context: | |
# * :form - the form builder | |
# * :project - the current project | |
def view_projects_form(context={}) | |
return content_tag(:p, | |
context[:form].select(:default_assignee_id, context[:project].assignable_users.collect {|user| [user.name, user.id]}, {:include_blank => :none})) |
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
<VirtualHost *:80> | |
ServerName projects.littlestreamsoftware.com | |
RewriteEngine On | |
# Redirect any non HTTPS requests to the HTTPS server | |
RewriteCond %{HTTP_HOST} ^projects.littlestreamsoftware.com$ [NC] | |
RewriteRule ^(.*)$ https://projects.littlestreamsoftware.com$1 [R=301,L] | |
Include /etc/apache2/common/hide-svn |
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
$ rake db:show_me_a_migration | |
(in /home/edavis/dev/redmine/redmine-core) | |
Found 62 Models | |
class AddMissingIndexes < ActiveRecord::Migration | |
def self.up | |
add_index :custom_fields_projects, : | |
add_index :custom_fields_projects, :custom_field_id | |
add_index :workflows, :new_status_id | |
add_index :deliverables, :type | |
add_index :deliverables, :project_id |