Skip to content
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

Merged
merged 5 commits into from
Sep 4, 2014
Merged

Refactor expenses controller #12

merged 5 commits into from
Sep 4, 2014

Conversation

bluerogue251
Copy link
Owner

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.

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)
Copy link
Collaborator

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]

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 834cce9 on refactor_controller into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 834cce9 on refactor_controller into * on master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 834cce9 on refactor_controller into * on master*.

@coveralls
Copy link

Coverage Status

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
Copy link
Collaborator

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]

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 38061a7 on refactor_controller into * on master*.

bluerogue251 added a commit that referenced this pull request Sep 4, 2014
@bluerogue251 bluerogue251 merged commit bc30672 into master Sep 4, 2014
@bluerogue251 bluerogue251 deleted the refactor_controller branch September 4, 2014 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants