Class: Bagboy::DataBagsController
Instance Method Summary
collapse
#initialize
Instance Method Details
#create ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'app/controllers/bagboy/data_bags_controller.rb', line 21
def create
opts = data_bag_params
opts[:path] = @bag_helper.data_bag_directory( opts[:name] )
@bag = Bagboy::Chef::DataBags::Bag.new( opts )
if @bag.create
redirect_to data_bags_path
else
render :new
end
end
|
#index ⇒ Object
6
7
8
|
# File 'app/controllers/bagboy/data_bags_controller.rb', line 6
def index
render :index
end
|
#new ⇒ Object
16
17
18
19
|
# File 'app/controllers/bagboy/data_bags_controller.rb', line 16
def new
@bag = Bagboy::Chef::DataBags::Bag.new
render :new
end
|
#show ⇒ Object
10
11
12
13
14
|
# File 'app/controllers/bagboy/data_bags_controller.rb', line 10
def show
@bag = @bag_helper.data_bag params[:bag]
@items = @bag.items
render :show
end
|