enterprises_block_controller.rb
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class EnterprisesBlockController < ApplicationController
# This controller always has the object @design_block available to it.
# The method acts_as_design_block load a before_filter that always load
# this object.
needs_profile
acts_as_design_block
# You must have a hash on format:
# {
# 'action name' => 'How the action will be displayed on menu'
# }
#
# EX:
# CONTROL_ACTION_OPTIONS = {
# 'design_edit' => _('Edit'),
# 'manage_links' => _('Manage Links')
# }
#
# This hash will define the options menu on edit mode.
CONTROL_ACTION_OPTIONS = {
# 'edit' => _('Edit')
}
###########################
# Mandatory methods
###########################
def index
@enterprises = Enterprise.find(:all)
design_render
end
###########################
# Other Sample of methods
###########################
# def edit
# design_render_on_edit
# end
# def save
# @design_block.update_attributes(params[:design_block])
# design_render_on_edit :nothing => true
# end
end