diff --git a/app/controllers/merged/cards_controller.rb b/app/controllers/merged/cards_controller.rb index 5a329fd..eee004d 100644 --- a/app/controllers/merged/cards_controller.rb +++ b/app/controllers/merged/cards_controller.rb @@ -18,7 +18,7 @@ module Merged else @card.move_down end - @card.save + @card.save(current_member) redirect_to section_cards_url(@card.section.id),notice: "#{@card.header} moved" end diff --git a/app/controllers/merged/changes_controller.rb b/app/controllers/merged/changes_controller.rb index 29e911a..898c02f 100644 --- a/app/controllers/merged/changes_controller.rb +++ b/app/controllers/merged/changes_controller.rb @@ -11,8 +11,8 @@ module Merged def commit raise "must have message" if params[:message].blank? git = Git.open(Rails.root) - git.add("cms") - git.add("app/assets/images/cms") + git.add("merged") + git.add( Image.root ) begin git.commit(params[:message]) rescue diff --git a/app/helpers/merged/changes_helper.rb b/app/helpers/merged/changes_helper.rb index f5a0941..000e26b 100644 --- a/app/helpers/merged/changes_helper.rb +++ b/app/helpers/merged/changes_helper.rb @@ -1,4 +1,10 @@ module Merged module ChangesHelper + + def cms_part? name + return true if name.include?( Image.root ) + return true if name.include?("merged/") + false + end end end diff --git a/app/models/merged/image.rb b/app/models/merged/image.rb index ece8e5e..9be3d52 100644 --- a/app/models/merged/image.rb +++ b/app/models/merged/image.rb @@ -70,6 +70,10 @@ module Merged end end + def self.root + "app/assets/images/cms" + end + private def asset_root diff --git a/app/views/merged/changes/index.haml b/app/views/merged/changes/index.haml index 8748078..0ed468e 100644 --- a/app/views/merged/changes/index.haml +++ b/app/views/merged/changes/index.haml @@ -11,25 +11,24 @@ .relative.block.border.border-gray-100 Changed Files -@status.changed.each do |name , file| - -next unless name.include?("cms") + -next unless cms_part?(name) %p = name .relative.block.border.border-gray-100 Deletions -@status.deleted.each do |name , file| - -next unless name.include?("cms") + -next unless cms_part?(name) %p= name .relative.block.border.border-gray-100 Additions -@status.added.each do |name , file| - -next unless name.include?("cms") + -next unless cms_part?(name) %p= name .relative.block.border.border-gray-100 New -@status.untracked.each do |name , file| - -next if name.starts_with?("merged") - -next unless name.include?("cms") + -next unless cms_part?(name) %p = name