Commit 5e6af8eb95bd93619421f8e7e3e70be6cc8b65c3
1 parent
0ce50d29
Exists in
master
and in
1 other branch
Fixed bug with setting IssueTracker to (None) in apps_controller
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/apps_controller.rb
| ... | ... | @@ -50,7 +50,7 @@ class AppsController < InheritedResources::Base |
| 50 | 50 | protected |
| 51 | 51 | def initialize_subclassed_issue_tracker |
| 52 | 52 | if params[:app][:issue_tracker_attributes] && tracker_type = params[:app][:issue_tracker_attributes][:type] |
| 53 | - if IssueTracker.subclasses.map(&:to_s).include?(tracker_type.to_s) | |
| 53 | + if IssueTracker.subclasses.map(&:to_s).concat(["IssueTracker"]).include?(tracker_type.to_s) | |
| 54 | 54 | @app.issue_tracker = tracker_type.constantize.new(params[:app][:issue_tracker_attributes]) |
| 55 | 55 | end |
| 56 | 56 | end | ... | ... |
app/models/issue_tracker.rb
| ... | ... | @@ -17,7 +17,7 @@ class IssueTracker |
| 17 | 17 | validate :check_params |
| 18 | 18 | |
| 19 | 19 | # Subclasses are responsible for overwriting this method. |
| 20 | - def check_params; end | |
| 20 | + def check_params; true; end | |
| 21 | 21 | |
| 22 | 22 | def issue_title err |
| 23 | 23 | "[#{ err.environment }][#{ err.where }] #{err.message.to_s.truncate(100)}" | ... | ... |