Class: FeaturerWeb::FeaturesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/featurer_web/features_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_user

Instance Method Summary collapse

Instance Method Details

#createObject



19
20
21
# File 'app/controllers/featurer_web/features_controller.rb', line 19

def create
  update_and_redirect
end

#destroyObject



23
24
25
26
27
# File 'app/controllers/featurer_web/features_controller.rb', line 23

def destroy
  Featurer.delete(params[:id])

  head 200
end

#editObject



11
12
13
# File 'app/controllers/featurer_web/features_controller.rb', line 11

def edit
  render locals: { feature: Feature.by_name(params[:id]) }
end

#indexObject



3
4
5
# File 'app/controllers/featurer_web/features_controller.rb', line 3

def index
  render locals: { collection: Feature.all }
end

#newObject



7
8
9
# File 'app/controllers/featurer_web/features_controller.rb', line 7

def new
  render locals: { feature: Feature.new }
end

#updateObject



15
16
17
# File 'app/controllers/featurer_web/features_controller.rb', line 15

def update
  update_and_redirect
end