Skip to content

Instantly share code, notes, and snippets.

@luizduma
Last active August 29, 2015 14:22
Show Gist options
  • Save luizduma/ee11352a8c52ef22f70c to your computer and use it in GitHub Desktop.
Save luizduma/ee11352a8c52ef22f70c to your computer and use it in GitHub Desktop.
ekanban modification for rails 4.x
diff --git a/Gemfile b/Gemfile
index 3dbcea4..39d00d8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,3 +1,3 @@
source 'https://rubygems.org'
gem "haml", "~> 4.0.5"
-
+gem "responders", "~> 2.0"
diff --git a/app/controllers/issue_status_kanban_states_controller.rb b/app/controllers/issue_status_kanban_states_controller.rb
index 97675fc..e6a12d8 100644
--- a/app/controllers/issue_status_kanban_states_controller.rb
+++ b/app/controllers/issue_status_kanban_states_controller.rb
@@ -1,13 +1,22 @@
class IssueStatusKanbanStatesController < ApplicationController
def update
puts params
- states = KanbanState.find_all_by_tracker_id(params[:tracker_id])
+ states = KanbanState.where(:tracker_id => params[:tracker_id]).all
old_maps = {}
states.map do |state|
old_maps[state.id.to_s] = state.issue_status_kanban_state.map {|m| m.issue_status_id.to_s} if state.issue_status_kanban_state
end
new_maps = params[:maps]
- diff = new_maps.diff(old_maps)
+ # diff = new_maps.diff(old_maps)
+ # Hash diff was deprecated in rails 4.0.2
+ ## File activesupport/lib/active_support/core_ext/hash/diff.rb, line 8
+ # def diff(other)
+ # ActiveSupport::Deprecation.warn "Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead."
+ # dup.
+ # delete_if { |k, v| other[k] == v }.
+ # merge!(other.dup.delete_if { |k, v| has_key?(k) })
+ # end
+ diff = new_maps.dup.delete_if { |k, v| old_maps[k] == v }.merge!(old_maps.dup.delete_if { |k, v| new_maps.has_key?(k) })
diff.each do |k,v|
removeds = (old_maps[k] || []) - (new_maps[k] || [])
addeds = (new_maps[k] || [])- (old_maps[k] || [])
diff --git a/app/controllers/kanban_panes_controller.rb b/app/controllers/kanban_panes_controller.rb
index 24fe987..bc62a80 100644
--- a/app/controllers/kanban_panes_controller.rb
+++ b/app/controllers/kanban_panes_controller.rb
@@ -15,7 +15,7 @@ class KanbanPanesController < ApplicationController
def states_left(kanban)
used_states = []
- states = KanbanState.find_all_by_tracker_id(kanban.tracker_id)
+ states = KanbanState.where(:tracker_id => kanban.tracker_id).all
kanban.kanban_pane.each {|p| used_states << p.kanban_state}
states = states.reject{|s| used_states.include?(s)}
end
@@ -48,7 +48,7 @@ class KanbanPanesController < ApplicationController
@project = Project.find(params[:project_id])
@kanban = Kanban.find(params[:kanban_id])
used_states = []
- @states = KanbanState.find_all_by_tracker_id(@kanban.tracker_id)
+ @states = KanbanState.where(:tracker_id => @kanban.tracker_id).all
@kanban.kanban_pane.each {|p| used_states << p.kanban_state if p.id != params[:id].to_i}
@states = @states.reject{|s| used_states.include?(s)}
@roles = Role.all
diff --git a/app/controllers/kanban_reports_controller.rb b/app/controllers/kanban_reports_controller.rb
index 6f91db1..6234a52 100644
--- a/app/controllers/kanban_reports_controller.rb
+++ b/app/controllers/kanban_reports_controller.rb
@@ -4,7 +4,11 @@ class KanbanReportsController < ApplicationController
#get the users in a group according to project.
group = (group == nil? || group == "0") ? nil : Group.to_group(group)
project = (project == nil? || project == "0") ? nil : Project.to_project(project)
- users = group.nil? ? User.find(:all, :conditions => ["lastname != 'Admin' and lastname !='Anonymous'"]) : User.in_group(group)
+users = if group.nil? then
+ User.where("lastname != 'Admin' and lastname !='Anonymous'")
+else
+ User.in_group(group)
+end
if project
users.reject! {|u| !u.member_of?(project)}
end
@@ -14,8 +18,8 @@ class KanbanReportsController < ApplicationController
def index
puts params
@groups = Group.all
- @projects = Project.find_all_by_is_public_and_status(true,1)
- @kanbans = Kanban.find_all_by_is_valid(true)
+ @projects = Project.where("is_public = ? AND status = ?", true,1).all
+ @kanbans = Kanban.where(:is_valid => true).all
@members = User.all
@project = Project.find(params[:project_id]) if !params[:project_id].nil? and params[:project_id]!="0"
@@ -138,7 +142,7 @@ class KanbanReportsController < ApplicationController
def statuses(stage_name)
stage = KanbanStage.find_by_name(stage_name)
states = []
- states = KanbanState.find_all_by_stage_id(stage.id) if !states.nil?
+ states = KanbanState.where(:stage_id => stage.id).all if !states.nil?
statuses = states.map {|s| IssueStatusKanbanState.status_id(s.id)}.uniq
return statuses
end
diff --git a/app/controllers/kanbans_controller.rb b/app/controllers/kanbans_controller.rb
index 8452c79..2f4c5fc 100644
--- a/app/controllers/kanbans_controller.rb
+++ b/app/controllers/kanbans_controller.rb
@@ -50,7 +50,7 @@ class KanbansController < ApplicationController
#Get all kanbans's name
@kanban_names = @kanbans.collect{|k| k.name}
respond_to do |format|
- format.html
+ format.html #index.html.erb
format.js { render :partial => "index", :locals => {:view=>@view, :kanbans=>@Kanbans}}
format.json { render :json => {:kanbans => @kanbans,
:teams => @principal,
@@ -72,11 +72,11 @@ class KanbansController < ApplicationController
def cards(pane_id)
pane = KanbanPane.find(pane_id)
if !@member.nil?
- cards = KanbanCard.by_member(@member).joins(:priority).find(:all, :conditions => ["kanban_pane_id = ?",pane.id], :order => "#{Enumeration.table_name}.position ASC")
+cards = KanbanCard.by_member(@member).joins(:priority).where("kanban_pane_id = ?", pane.id).order("#{Enumeration.table_name}.position ASC")
elsif !@principal.nil?
- cards = KanbanCard.by_group(@principal).joins(:priority).find(:all, :conditions => ["kanban_pane_id = ?",pane.id], :order => "#{Enumeration.table_name}.position ASC")
+cards = KanbanCard.by_group(@principal).joins(:priority).where("kanban_pane_id = ?", pane.id).order("#{Enumeration.table_name}.position ASC")
else
- cards = KanbanCard.joins(:priority).find(:all, :conditions => ["kanban_pane_id = ?",pane.id], :order => "#{Enumeration.table_name}.position ASC")
+cards = KanbanCard.joins(:priority).where("kanban_pane_id = ?", pane.id).order("#{Enumeration.table_name}.position ASC")
end
cards
end
@@ -116,7 +116,7 @@ class KanbansController < ApplicationController
def new
@kanban = Kanban.new
@project = Project.find(params[:project_id])
- @kanbans = Kanban.find_all_by_project_id(params[:project_id])
+ @kanbans = Kanban.where(:project_id => params[:project_id]).all
if @kanbans.nil?
@trackers = Tracker.all
@copiable_kanbans = Kanbans.all
@@ -126,7 +126,7 @@ class KanbansController < ApplicationController
@trackers = Tracker.all.reject {|t| used_trackers.include?(t)}
end
- @copiable_kanbans = Kanban.find(:all, :conditions => ["tracker_id in (?) and is_valid = ?", @trackers.select{|t| t.id}, true])
+@copiable_kanbans = Kanban.where("tracker_id in (?) and is_valid = ?", @trackers.select { |t| t.id }, true)
@copiable_kanbans.each do |k|
if k.project.nil?
k.name += " - Deleted Project"
@@ -184,7 +184,7 @@ class KanbansController < ApplicationController
def edit
@project = Project.find(params[:project_id])
@kanban = Kanban.find(params[:id])
- @kanbans = Kanban.find_all_by_project_id(params[:project_id])
+ @kanbans = Kanban.where(:project_id => params[:project_id]).all
@roles = Role.all
if @kanbans.nil?
@trackers = Tracker.all
@@ -211,8 +211,8 @@ class KanbansController < ApplicationController
# create a new kanban by copying reference.
def copy
ref_kanban = Kanban.find(params[:ref_id])
- ref_kanban_panes = KanbanPane.find_all_by_kanban_id(params[:ref_id])
- ref_workflow = KanbanWorkflow.find_all_by_kanban_id(params[:ref_id])
+ ref_kanban_panes = KanbanPane.where(:kanban_id => params[:ref_id]).all
+ ref_workflow = KanbanWorkflow.where(:kanban_id => params[:ref_id]).all
new_kanban = ref_kanban.dup
new_kanban.project_id = params[:project_id]
diff --git a/app/models/issue_status_kanban_state.rb b/app/models/issue_status_kanban_state.rb
index fda01fa..b57851b 100644
--- a/app/models/issue_status_kanban_state.rb
+++ b/app/models/issue_status_kanban_state.rb
@@ -1,11 +1,12 @@
class IssueStatusKanbanState < ActiveRecord::Base
unloadable
- belongs_to :kanban_state
- belongs_to :issue_status
+belongs_to :kanban_state
+belongs_to :issue_status
def self.state_id(issue_status_id,tracker_id)
- rec = IssueStatusKanbanState.find(:all, :conditions => ["#{KanbanState.table_name}.tracker_id=? and issue_status_id = ?", tracker_id,issue_status_id], :include => :kanban_state)
+ #rec = IssueStatusKanbanState.joins(:"#{IssueStatusKanbanState.table_name}",:"#{KanbanState.table_name}").where("#{KanbanState.table_name}.tracker_id=? and issue_status_id = ?", tracker_id, issue_status_id)
+ rec = IssueStatusKanbanState.where("#{KanbanState.table_name}.tracker_id=? and issue_status_id = ?", tracker_id, issue_status_id).includes(:kanban_state).references(:kanban_state)
return rec.first.kanban_state_id if !rec.first.nil?
end
diff --git a/app/models/kanban.rb b/app/models/kanban.rb
index 42a3d7f..5e8217e 100644
--- a/app/models/kanban.rb
+++ b/app/models/kanban.rb
@@ -1,11 +1,13 @@
class Kanban < ActiveRecord::Base
unloadable
- belongs_to :project
- belongs_to :tracker
- belongs_to :creater, :foreign_key => :created_by, :class_name => :User
- has_many :kanban_pane, :order => "position ASC"
+belongs_to :project
+belongs_to :tracker
+belongs_to :creater, foreign_key: :created_by, class_name: :User
+has_many :kanban_pane, -> { order("position ASC") }
validates_presence_of :project_id, :tracker_id
+ # WARNING: Can't mass-assign protected attributes for KanbanState
+ attr_accessible :name, :tracker_id, :description, :is_valid
before_destroy :delete_all_members
@@ -14,8 +16,8 @@ class Kanban < ActiveRecord::Base
project_id = project.nil? ? Project.current : project.is_a?(Project) ? project.id : project.to_i
where(:project_id => project_id)
}
- scope :by_tracker, lambda {|tracker| where(:tracker_id => tracker)}
- scope :valid, lambda {where(:is_valid => true)}
+scope :by_tracker, lambda { |tracker| where(tracker_id: tracker) }
+scope :valid, -> { where(is_valid: true) }
def self.to_id(kanban)
kanban_id = kanban.nil? ? nil : kanban.is_a?(Kanban) ? kanban.id : kanban.to_i
diff --git a/app/models/kanban_card.rb b/app/models/kanban_card.rb
index 7bece9c..3766c01 100644
--- a/app/models/kanban_card.rb
+++ b/app/models/kanban_card.rb
@@ -1,12 +1,12 @@
class KanbanCard < ActiveRecord::Base
unloadable
- belongs_to :issue
- belongs_to :developer, :class_name => :User
- belongs_to :verifier, :class_name => :User
- belongs_to :kanban_pane, :class_name => :KanbanPane
- has_many :issue_journals, :through => :issue, :source => :journals
- has_one :priority, :through => :issue, :source => :priority
- has_many :kanban_card_journals
+belongs_to :issue
+belongs_to :developer, class_name: :User
+belongs_to :verifier, class_name: :User
+belongs_to :kanban_pane, class_name: :KanbanPane
+has_many :issue_journals, through: :issue, source: :journals
+has_one :priority, through: :issue, source: :priority
+has_many :kanban_card_journals
scope :by_group, lambda {|group|
return if group.nil?
@@ -25,7 +25,7 @@ class KanbanCard < ActiveRecord::Base
scope :by_user, lambda {|user|
user_id = User.to_id(user)
- {:conditions => ["#{Issue.table_name}.assigned_to_id=?", user_id], :include => :issue}
+ -> { where("#{Issue.table_name}.assigned_to_id=?", user_id).includes(:issue).requires(:issue) }
}
scope :by_member, lambda {|member|
@@ -53,7 +53,7 @@ class KanbanCard < ActiveRecord::Base
scope :open, lambda {|*args|
is_closed = args.size > 0 ? !args.first : false
is_closed_id = IssueStatus.closed_id;
- {:conditions => ["#{Issue.table_name}.status_id #{is_closed ? "" : "!"}= ?", is_closed_id], :include => [:issue]}
+ -> { where("#{Issue.table_name}.status_id #{is_closed ? "" : "!"}= ?", is_closed_id).includes(:issue) }
}
def in_progress?(roles)
diff --git a/app/models/kanban_card_journal.rb b/app/models/kanban_card_journal.rb
index ade945b..5c4dff4 100644
--- a/app/models/kanban_card_journal.rb
+++ b/app/models/kanban_card_journal.rb
@@ -1,7 +1,7 @@
class KanbanCardJournal < ActiveRecord::Base
- belongs_to :kanban_card
- belongs_to :issue_journal, :class_name => :Journal
+belongs_to :kanban_card
+belongs_to :issue_journal, class_name: :Journal
has_many :details, :foreign_key => "journal_id", :class_name => :KanbanCardJournalDetail, :dependent => :delete_all
def self.build(old_card,new_card,issue_journal)
diff --git a/app/models/kanban_card_journal_detail.rb b/app/models/kanban_card_journal_detail.rb
index 83762d5..89bcd94 100644
--- a/app/models/kanban_card_journal_detail.rb
+++ b/app/models/kanban_card_journal_detail.rb
@@ -1,3 +1,3 @@
class KanbanCardJournalDetail < ActiveRecord::Base
- belongs_to :journal, :class_name => :KanbanCardJournal
-end
\ No newline at end of file
+belongs_to :journal, class_name: :KanbanCardJournal
+end
diff --git a/app/models/kanban_pane.rb b/app/models/kanban_pane.rb
index 0159000..72df130 100644
--- a/app/models/kanban_pane.rb
+++ b/app/models/kanban_pane.rb
@@ -1,11 +1,11 @@
class KanbanPane < ActiveRecord::Base
unloadable
- belongs_to :kanban_state
- belongs_to :kanban
- belongs_to :role
- has_many :kanban_card
- has_many :issue, :through=>:kanban_card, :order => "priority_id ASC, updated_on DESC, issue_id DESC"
+belongs_to :kanban_state
+belongs_to :kanban
+belongs_to :role
+has_many :kanban_card
+has_many :issue, -> { order("priority_id ASC, updated_on DESC, issue_id DESC") }, through: :kanban_card
validates_presence_of :kanban_state
before_destroy :check_cards_and_workflow
@@ -115,7 +115,7 @@ class KanbanPane < ActiveRecord::Base
errors.add("","Cannot delete pane #{self.name}, #{count} cards still in this pane!")
end
- flows = KanbanWorkflow.find(:all, :conditions => ["(old_state_id = ? or new_state_id = ?) and kanban_id = ?", self.kanban_state.id, self.kanban_state.id, self.kanban.id])
+flows = KanbanWorkflow.where("(old_state_id = ? or new_state_id = ?) and kanban_id = ?", self.kanban_state.id, self.kanban_state.id, self.kanban.id)
count = 0
count = flows.size if !flows.nil?
if count > 0
diff --git a/app/models/kanban_stage.rb b/app/models/kanban_stage.rb
index 3187eb2..3366e0d 100644
--- a/app/models/kanban_stage.rb
+++ b/app/models/kanban_stage.rb
@@ -2,6 +2,8 @@ class KanbanStage < ActiveRecord::Base
unloadable
before_destroy :check_kanban_states
+ # WARNING: Can't mass-assign protected attributes for KanbanState
+ attr_accessible :name, :description
def check_kanban_states
count = KanbanState.count(:all, :conditions => ["stage_id = ?",self.id])
diff --git a/app/models/kanban_state.rb b/app/models/kanban_state.rb
index 7eb04ed..e015cc7 100644
--- a/app/models/kanban_state.rb
+++ b/app/models/kanban_state.rb
@@ -1,13 +1,15 @@
class KanbanState < ActiveRecord::Base
unloadable
- belongs_to :tracker
- belongs_to :kanban_stage, :foreign_key => :stage_id
- has_many :kanban_pane
- has_many :issue_status_kanban_state
- has_many :issue_status, :through => :issue_status_kanban_state
+belongs_to :tracker
+belongs_to :kanban_stage, foreign_key: :stage_id
+has_many :kanban_pane
+has_many :issue_status_kanban_state
+has_many :issue_status, through: :issue_status_kanban_state
validates_presence_of :tracker
validates_presence_of :kanban_stage
before_destroy :check_panes_and_issue_status
+ # WARNING: Can't mass-assign protected attributes for KanbanState
+ attr_accessible :name, :tracker_id, :stage_id, :is_default, :is_initial, :is_closed, :description
def check_panes_and_issue_status
count = KanbanPane.count(:all, :joins => :kanban, :conditions => ["#{Kanban.table_name}.is_valid = ? and kanban_state_id = ?",true, self.id])
diff --git a/app/models/kanban_workflow.rb b/app/models/kanban_workflow.rb
index 9827e24..06dc6a7 100644
--- a/app/models/kanban_workflow.rb
+++ b/app/models/kanban_workflow.rb
@@ -1,8 +1,8 @@
class KanbanWorkflow < ActiveRecord::Base
unloadable
- belongs_to :old_state, :class_name => "KanbanState"
- belongs_to :new_state, :class_name => "KanbanState"
- belongs_to :role
+belongs_to :old_state, class_name: "KanbanState"
+belongs_to :new_state, class_name: "KanbanState"
+belongs_to :role
scope :possible_transition, lambda {|current_state,kanban_id|
{:conditions => ["#{KanbanWorkflow.table_name}.old_state_id = ? and kanban_id = ?", current_state,kanban_id]}
diff --git a/app/views/kanban_states/_maps_form.html.haml b/app/views/kanban_states/_maps_form.html.haml
index a1c7e52..3812709 100644
--- a/app/views/kanban_states/_maps_form.html.haml
+++ b/app/views/kanban_states/_maps_form.html.haml
@@ -1,7 +1,7 @@
- statuses = IssueStatus.all
- maps = IssueStatusKanbanState.all
%h3= "Tracker: #{tracker.name}"
-- states = KanbanState.find_all_by_tracker_id(tracker.id)
+- states = KanbanState.where(:tracker_id => tracker.id).all
- if !states.nil?
%table{:id => "kanban_workflow_table",:class => "list"}
%thead
diff --git a/app/views/kanban_states/_state_list.html.haml b/app/views/kanban_states/_state_list.html.haml
index 15bf69c..a36ec73 100644
--- a/app/views/kanban_states/_state_list.html.haml
+++ b/app/views/kanban_states/_state_list.html.haml
@@ -3,7 +3,7 @@
- trackers = Tracker.all
- trackers.each do |t|
%h3= "Tracker #{t.name}"
- - states = KanbanState.find_all_by_tracker_id(t.id)
+ - states = KanbanState.where(:tracker_id => t.id).all
- if !states.nil?
%table{:id => "kanban_state_#{t.id}",:class => "list"}
%thead
diff --git a/app/views/kanbans/index.html.haml b/app/views/kanbans/index.html.haml
index 771f5f2..026dd83 100644
--- a/app/views/kanbans/index.html.haml
+++ b/app/views/kanbans/index.html.haml
@@ -1,6 +1,6 @@
.contextual
%span Your current wip:
- = link_to "#{User.current.wip} ", my_page_path(), :id => "my-wip"
+ = link_to "#{User.current.wip} ", my_page_path(), :id => "my-wip"
%span Limit:
= link_to "#{User.current.wip_limit} ", edit_user_path(User.current.id), :id => "my-wip-limit"
= link_to l(:label_kanban_new), new_project_kanban_path(@project.id), :class => 'icon icon-add'
diff --git a/config/routes.rb b/config/routes.rb
index ccc3fe1..dc1af4c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,17 +16,17 @@ RedmineApp::Application.routes.draw do
resources :kanban_stages
- match 'kanban_apis/kanban_card_journals', :controller => 'kanban_apis', :action => 'kanban_card_journals', :via => :get
- match 'kanban_apis/kanban_state_issue_status', :controller => 'kanban_apis', :action => 'kanban_state_issue_status', :via => :get
- match 'kanban_apis/kanban_workflow', :controller => 'kanban_apis', :action => 'kanban_workflow', :via => :get
- match 'kanban_apis/kanban_states', :controller => 'kanban_apis', :action => 'kanban_states', :via => :get
- match 'kanban_apis/close_issues', :controller => 'kanban_apis', :action => 'close_issues', :via => :put
- match 'project/:project_id/kanbans', :controller => 'kanbans', :action => 'index', :via => :get
- match 'kanban_apis/user_wip_and_limit', :controller => 'kanban_apis', :action => 'user_wip_and_limit', :via => :get
- match 'kanbans/setup', :controller => 'kanbans', :action => 'setup', :via => :get
- match 'kanban_states/setup', :controller=>'kanban_states', :action => 'setup', :via => :get
- match 'issue_status_kanban_states/update', :controller => 'issue_status_kanban_states', :action => "update", :via => :put
- match 'kanbans/copy', :controller => 'kanbans', :action => "copy"
- match 'kanban_reports/index', :controller => 'kanban_reports', :action => "index", :via => :get
- match 'kanban_apis/issue_card_detail', :controller => 'kanban_apis', :action => 'issue_card_detail', :via => :get
+ get 'kanban_apis/kanban_card_journals', :controller => 'kanban_apis', :action => 'kanban_card_journals'
+ get 'kanban_apis/kanban_state_issue_status', :controller => 'kanban_apis', :action => 'kanban_state_issue_status'
+ get 'kanban_apis/kanban_workflow', :controller => 'kanban_apis', :action => 'kanban_workflow'
+ get 'kanban_apis/kanban_states', :controller => 'kanban_apis', :action => 'kanban_states'
+ put 'kanban_apis/close_issues', :controller => 'kanban_apis', :action => 'close_issues'
+ get 'project/:project_id/kanbans', :controller => 'kanbans', :action => 'index'
+ get 'kanban_apis/user_wip_and_limit', :controller => 'kanban_apis', :action => 'user_wip_and_limit'
+ get 'kanbans/setup', :controller => 'kanbans', :action => 'setup'
+ get 'kanban_states/setup', :controller=>'kanban_states', :action => 'setup'
+ put 'issue_status_kanban_states/update', :controller => 'issue_status_kanban_states', :action => "update"
+ put 'kanbans/copy', :controller => 'kanbans', :action => "copy"
+ get 'kanban_reports/index', :controller => 'kanban_reports', :action => "index"
+ get 'kanban_apis/issue_card_detail', :controller => 'kanban_apis', :action => 'issue_card_detail'
end
diff --git a/lib/ekanban/issue_patch.rb b/lib/ekanban/issue_patch.rb
index 81f19d7..828ac9b 100644
--- a/lib/ekanban/issue_patch.rb
+++ b/lib/ekanban/issue_patch.rb
@@ -9,7 +9,7 @@ module EKanban
base.class_eval do
unloadable
- has_one :kanban_card
+has_one :kanban_card
scope :belong_to_group, lambda {|group|
group_id = group.nil? ? User.current_group : group.is_a?(Group) ? group.id : group.to_i
{:conditions => ["#{Issue.table_name}.assigned_to_id IN (SELECT gu.user_id FROM #{table_name_prefix}groups_users#{table_name_suffix} gu WHERE gu.group_id = ?)", group_id]}
diff --git a/lib/ekanban/issue_status_patch.rb b/lib/ekanban/issue_status_patch.rb
index 957a96c..3601da4 100644
--- a/lib/ekanban/issue_status_patch.rb
+++ b/lib/ekanban/issue_status_patch.rb
@@ -5,8 +5,8 @@ module EKanban
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
base.class_eval do
- has_many :issue_status_kanban_state
- has_many :kanban_state, :through => :issue_status_kanban_state
+has_many :issue_status_kanban_state
+has_many :kanban_state, through: :issue_status_kanban_state
end
end
@@ -23,4 +23,4 @@ module EKanban
end
end
end
-end
\ No newline at end of file
+end
diff --git a/lib/ekanban/journal_patch.rb b/lib/ekanban/journal_patch.rb
index 7555a94..7a0c7d0 100644
--- a/lib/ekanban/journal_patch.rb
+++ b/lib/ekanban/journal_patch.rb
@@ -30,4 +30,4 @@ module EKanban
end
end
end
-end
\ No newline at end of file
+end
diff --git a/lib/ekanban/project_patch.rb b/lib/ekanban/project_patch.rb
index e649a71..e6598d4 100644
--- a/lib/ekanban/project_patch.rb
+++ b/lib/ekanban/project_patch.rb
@@ -7,7 +7,7 @@ module EKanban
base.send(:include, InstanceMethods)
base.class_eval do
- has_many :kanban
+has_many :kanban
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment