-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor expenses controller #12
Conversation
Using the Rails Antipattern chapter on "Rats Nest Resources" as a guide, this separates out what used to be the ExpensesController into two new controllers: ExpensesController -- for unscoped expenses User::ExpensesController -- for expenses scoped to current_user It also moves the feature specs and model files to mirror this layout.
end | ||
|
||
def expense_params | ||
params.require(:expense).permit(:date, :category_id, :description, :currency, :amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [90/80]
Changes Unknown when pulling 834cce9 on refactor_controller into * on master*. |
Changes Unknown when pulling 834cce9 on refactor_controller into * on master*. |
Changes Unknown when pulling 834cce9 on refactor_controller into * on master*. |
Changes Unknown when pulling bee348d on refactor_controller into * on master*. |
class User | ||
class ExpensesDatatable | ||
include DatatablesHelper | ||
delegate :params, :link_to, :fa_icon, :number_with_precision, to: :view_context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
Changes Unknown when pulling 38061a7 on refactor_controller into * on master*. |
Refactor expenses controller
Using the Rails Antipattern chapter on "Rats Nest Resources" as a guide,
this separates out what used to be the ExpensesController into two new
controllers:
ExpensesController -- for unscoped expenses
User::ExpensesController -- for expenses scoped to current_user
It also moves the feature specs and model files to mirror this layout.