-
Notifications
You must be signed in to change notification settings - Fork 4
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
Merge profiles into users WIP #109
Conversation
@@ -0,0 +1,96 @@ | |||
class MergeProfileIntoUser < ActiveRecord::Migration | |||
def change |
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.
Assignment Branch Condition size for change is too high. [36/15]
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.
wtf
You should split this into 3 migrations:
|
elsif((!@dokument.public) && (current_user) && (@dokument.pdf_file_name) || (@dokument.public)) | ||
send_file(@dokument.pdf.path, filename:@dokument.pdf_file_name, type: "application/pdf",disposition: 'inline',x_sendfile: true) | ||
elsif ((!@dokument.public) && (current_user) && (@dokument.pdf_file_name) || (@dokument.public)) | ||
send_file(@dokument.pdf.path, filename: @dokument.pdf_file_name, type: "application/pdf", disposition: 'inline', x_sendfile: true) |
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. [136/100]
Prefer single-quoted strings when you don't need string interpolation or special symbols.
I realized it might be bad to make all those changes in one commit. |
I will look at this some more now, because refactoring other code that depends so much on profiles is not that nice before this is done. |
return | ||
end | ||
send_file(@document.pdf.path, filename: @document.pdf_file_name, | ||
type: 'application/pdf', disposition: 'inline', x_sendfile: true) |
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.
Align the elements of a hash literal if they span more than one line.
Pushed to dev |
insert into post_users (post_id, user_id) | ||
select post_id, profile_id as user_id from posts_profiles | ||
eof | ||
|
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.
Extra empty line detected at method body end.
@fsek/admins Jag har fixat de fel jag hittat. Prova gärna denna PR på dev.fsektionen.se och säg till om ni hittar några fel. Annars tycker jag vi mergar denna :) |
…ile-merge Merging new changes with own state
config.action_mailer.raise_delivery_errors = true | ||
config.action_mailer.default charset: 'utf-8' | ||
config.action_mailer.raise_delivery_errors = false | ||
config.action_mailer.default :charset => "utf-8" |
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.
Use the new Ruby 1.9 hash syntax.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
cafe_work: attributes_for(:assignee, :test)) | ||
cwork_profile.reload | ||
patch(:update_worker, id: cwork_worker.to_param, | ||
cafe_work: attributes_for(:assignee, :test)) |
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.
Align the elements of a hash literal if they span more than one line.
Lets merge this! I mean, it can't break anything, right? 👼 |
No but seriously, we have tested the migration on dev and it did work fine there. I will take a db backup before I merge. |
Merge profiles into users WIP
This PR was deployed to Production. Reference: d9a72a2 |
Profiles will be merged into users.
The migration is done, now we have to fix up all the references to Profile that still remain.
A good command to use for checking what is left to do:
$ egrep -Ri 'profiles?' app lib config