Class: Cmsimple::PathsController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/cmsimple/paths_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
14
# File 'app/controllers/cmsimple/paths_controller.rb', line 10

def create
  @path = Path.new(params[:path])
  @path.save
  respond_with @path
end

#destroyObject



16
17
18
19
20
# File 'app/controllers/cmsimple/paths_controller.rb', line 16

def destroy
  @path = Path.find(params[:id])
  @path.destroy
  respond_with @path
end

#indexObject



5
6
7
8
# File 'app/controllers/cmsimple/paths_controller.rb', line 5

def index
  @paths = Path.all
  respond_with @paths
end