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

Some smaller refactorings #3370

Merged
merged 5 commits into from
Aug 19, 2015
Merged

Some smaller refactorings #3370

merged 5 commits into from
Aug 19, 2015

Conversation

timhabermaas
Copy link
Contributor

This is just some stuff I found while getting to know the code base. IMO none of the changes should be controversial and the PR is mergeable as is, unless Travis disagrees with me.

@TeatroIO
Copy link

I've prepared a stage to preview changes. Open stage or view logs.

format.html do render layout: false end
format.any(:xml, :json) { render request.format.to_sym => wp_hashes_with_string }
format.html { render layout: false }
format.any(:xml, :json) { render request.format.to_sym => wp_hashes_with_string(@work_packages) }

Choose a reason for hiding this comment

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

Line is too long. [103/100]

@timhabermaas
Copy link
Contributor Author

Thinking about it: d0426dc probably conflicts with the Rails 4 upgrade. I can remove that commit if it causes conflicts.

@@ -43,7 +43,7 @@ def create
author: user,
type: project.types.where(is_default: true).first || project.types.first
}
self.work_package = project.add_work_package(hash)
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch! I thought, that we stopped remembering the own work package, long ago...

@NobodysNightmare
Copy link
Contributor

d0426dc probably conflicts with the Rails 4 upgrade. I can remove that commit if it causes conflicts.

Nice to see, that you are thinking about that. But we can't stop introducing find_by_foo statements and your code is definitely an improvement (on the current codebase). I don't think that there will be hard git conflicts, though. Just another find_by_foo that needs to be replaced again :/

@@ -55,14 +55,14 @@ def index

respond_to do |format|
format.html do render layout: false end
format.any(:xml, :json) { render request.format.to_sym => wp_hashes_with_string }
format.any(:xml, :json) { render request.format.to_sym => wp_hashes_with_string(@work_packages) }

Choose a reason for hiding this comment

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

Line is too long. [103/100]

@timhabermaas
Copy link
Contributor Author

@NobodysNightmare I removed the block style change and force pushed the branch. Feel free to merge it.

NobodysNightmare added a commit that referenced this pull request Aug 19, 2015
@NobodysNightmare NobodysNightmare merged commit 5eee75e into opf:dev Aug 19, 2015
@NobodysNightmare
Copy link
Contributor

I feel that I merged this PR prematurely

image

Investigating...

edit: Okay, it has apparently been an error when merging this PR with the rails4 branch...

@timhabermaas timhabermaas deleted the random-cleanups branch August 19, 2015 08:54
@basiszwo
Copy link
Contributor

so what's the state here? still an error or not?

@NobodysNightmare
Copy link
Contributor

Oh, nono... my edit was probably not clear enough.

It was an error with the merge immediately following the merge of this PR. And the error was fixed immediately. So nothing to worry about on this PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants