Sha256: 5b30afa34d113cf56fed3def5b2437fa045a57b7f729cc580ccf43ad3078537e

Contents?: true

Size: 456 Bytes

Versions: 12

Compression:

Stored size: 456 Bytes

Contents

class Detour::FlagsController < Detour::ApplicationController
  before_filter :ensure_flaggable_type_exists

  def index
    @flag_form = Detour::FlagForm.new(params[:flaggable_type])
  end

  def update
    @flag_form = Detour::FlagForm.new(params[:flaggable_type])

    if @flag_form.update_attributes(params)
      flash[:notice] = "Your flags have been successfully updated."
      redirect_to flags_path
    else
      render :index
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
detour-0.0.15 app/controllers/detour/flags_controller.rb
detour-0.0.14 app/controllers/detour/flags_controller.rb
detour-0.0.13 app/controllers/detour/flags_controller.rb
detour-0.0.12 app/controllers/detour/flags_controller.rb
detour-0.0.11 app/controllers/detour/flags_controller.rb
detour-0.0.10 app/controllers/detour/flags_controller.rb
detour-0.0.9 app/controllers/detour/flags_controller.rb
detour-0.0.7 app/controllers/detour/flags_controller.rb
detour-0.0.6 app/controllers/detour/flags_controller.rb
detour-0.0.5 app/controllers/detour/flags_controller.rb
detour-0.0.3 app/controllers/detour/flags_controller.rb
detour-0.0.2 app/controllers/detour/flags_controller.rb