Sha256: 134121b572eefa5ad33e4f3817e8aeb3459f2df3995c256c05e114edc694fd66

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

class Detour::FeaturesController < Detour::ApplicationController
  def create
    @feature = Detour::Feature.new(params[:feature])

    if @feature.save
      flash[:notice] = "Your feature has been successfully created."
      render :success
    else
      render :error
    end
  end

  def destroy
    @feature = Detour::Feature.find(params[:id])
    @feature.destroy
    flash[:notice] = "Feature #{@feature.name} has been deleted."
    redirect_to flags_path(params[:flaggable_type])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
detour-0.0.3 app/controllers/detour/features_controller.rb
detour-0.0.2 app/controllers/detour/features_controller.rb