Cleanup routings
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# Redmine Messenger plugin for Redmine
|
||||
require 'net/http'
|
||||
|
||||
class Messenger
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
# Redmine Messenger plugin for Redmine
|
||||
|
||||
class MessengerSetting < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
belongs_to :project
|
||||
|
||||
validates :project_id, presence: true
|
||||
|
||||
safe_attributes 'messenger_url',
|
||||
'messenger_icon',
|
||||
'messenger_channel',
|
||||
@@ -30,7 +26,7 @@ class MessengerSetting < ActiveRecord::Base
|
||||
'post_password',
|
||||
'post_password_updates'
|
||||
|
||||
attr_protected :id
|
||||
attr_protected :id, :project_id
|
||||
|
||||
def self.find_or_create(p_id)
|
||||
setting = MessengerSetting.find_by(project_id: p_id)
|
||||
|
||||
Reference in New Issue
Block a user