Module: Breeze::ChangesHelper

Defined in:
app/helpers/breeze/changes_helper.rb

Instance Method Summary collapse

Instance Method Details

#branchObject



5
6
7
# File 'app/helpers/breeze/changes_helper.rb', line 5

def branch
  %x[git branch]
end

#changeset(type, element) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/helpers/breeze/changes_helper.rb', line 15

def changeset( type , element)
  case type
  when :add
    ChangeSet.current.added( element )
  when :edit
    ChangeSet.current.edited( element )
  when :delete
    ChangeSet.current.deleted( element )
  else
    raise "unrecognized type #{type}"
  end
end

#cms_part?(name) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'app/helpers/breeze/changes_helper.rb', line 9

def cms_part? name
  return true if name.include?( Breeze.images_dir )
  return true if name.include?(Breeze.data_dir)
  false
end