mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-28 17:49:38 +02:00
Scaffold out rules domain
This commit is contained in:
parent
b2d8da8857
commit
f12fc1efd7
16 changed files with 129 additions and 28 deletions
36
app/controllers/rules_controller.rb
Normal file
36
app/controllers/rules_controller.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
class RulesController < ApplicationController
|
||||
before_action :set_rule, only: [ :show, :edit, :update, :destroy ]
|
||||
|
||||
def index
|
||||
@rules = Current.family.rules
|
||||
render layout: "settings"
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def new
|
||||
end
|
||||
|
||||
def create
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def update
|
||||
end
|
||||
|
||||
def destroy
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_rule
|
||||
@rule = Current.family.rules.find(params[:id])
|
||||
end
|
||||
|
||||
def rule_params
|
||||
params.require(:rule).permit(:effective_date, :active)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue