Sha256: 2ff99a9f00fea1923c62e9dc620429906da47d68cf3a9f9b41f4850c07c5c6d6

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

class NotificationRulesController < ApplicationController
  layout 'whoops'

  def index
    @notification_rule = Whoops::NotificationRule.new
    @notification_rules = Whoops::NotificationRule.asc(:email)
  end

  def create
    Whoops::NotificationRule.add_rules(params[:notification_rule])
    redirect_to whoops_notification_rules_path
  end

  def edit
    @notification_rule = Whoops::NotificationRule.find(params[:id])
  end

  def update
    @notification_rule = Whoops::NotificationRule.find(params[:id])
    @notification_rule.update_attributes(params[:notification_rule])
    notification_rules = Whoops::NotificationRule.asc(:email)
    redirect_to whoops_notification_rules_path
  end

  def destroy
    Whoops::NotificationRule.find(params[:id]).destroy
    redirect_to whoops_notification_rules_path
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
whoops-0.3.5 app/controllers/notification_rules_controller.rb
whoops-0.3.4 app/controllers/notification_rules_controller.rb
whoops-0.3.3 app/controllers/notification_rules_controller.rb
whoops-0.3.2 app/controllers/notification_rules_controller.rb
whoops-0.3.1 app/controllers/notification_rules_controller.rb
whoops-0.3 app/controllers/notification_rules_controller.rb