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 #31

Closed
wants to merge 5 commits into from
Closed

Refactor #31

wants to merge 5 commits into from

Conversation

imanghafoori1
Copy link
Contributor

refactor to reach fewer lines of code

'display_name' => $request->display_name,
'description' => $request->description,
]);
$role->update($request->only(['name', 'display_name', 'description']));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even thought this may seems a good refactoring, sometimes the raw model could not have a 1:1 match with a form fields name.

I think the old way it's better right now because one simple thing:

  1. Controllers are not backed-up by tests

@imanghafoori1
Copy link
Contributor Author

Feel free to close this if you do not like it.

@ludo237
Copy link

ludo237 commented Mar 22, 2018

The problem is not whether I like or not, it's about bring logic to refactors. Refactoring an untested code is always risky

@ajitbohra
Copy link
Member

Agree with what @ludo237 mentioned, personally want to refactor many parts of the code. On my list to review complete code and plan out refactoring in the best possible way.

@imanghafoori1 closing this for now

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.

3 participants