fix changes, still wip
This commit is contained in:
parent
034d605d78
commit
b42d8137a9
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -70,6 +70,10 @@ module Merged
|
||||
end
|
||||
end
|
||||
|
||||
def self.root
|
||||
"app/assets/images/cms"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def asset_root
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user