Skip to content

Feature/register created by and updated by #21

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

Merged
merged 8 commits into from
Aug 7, 2019

Conversation

simaob
Copy link
Contributor

@simaob simaob commented Aug 6, 2019

This Pull Request adds:

  • UserTrackable and UserTracker concerns to enable keeping track of who added a record and who edited it last;
  • It integrates the above with litigations;
  • It updates litigations admin pages with the created_by and updated_by;
  • Updates litigations controller specs to handle this. Had to manually delete the current_user key, as it was persisting between specs and causing non existing users to be used in new specs. Wondering if this is the best way to do it. But I spent 2 hours banging my head against it, so I'll go with this for now.

@simaob simaob requested a review from tsubik August 6, 2019 17:45
Copy link
Contributor

@tsubik tsubik left a comment

Choose a reason for hiding this comment

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

Overall looks clean and great. You can try without request_store, take a look at my comment (disclaimer: I haven't used CurrentAttributes, seems like a new toy/double edge sword :P)

@simaob simaob requested a review from tsubik August 7, 2019 09:22
@tsubik
Copy link
Contributor

tsubik commented Aug 7, 2019

Forgot to say that is also worth to add updated_by, created_by to view page to be like updated_at, updated_by, created_at, created_by

@simaob
Copy link
Contributor Author

simaob commented Aug 7, 2019

you mean the show page? I added it to the index.

@simaob
Copy link
Contributor Author

simaob commented Aug 7, 2019

or you mean including the dates as well?

@tsubik
Copy link
Contributor

tsubik commented Aug 7, 2019

Show page.

@tsubik
Copy link
Contributor

tsubik commented Aug 7, 2019

I think it wasn't there.

@tsubik
Copy link
Contributor

tsubik commented Aug 7, 2019

And we have annotate gem, so you can be annotate

@simaob
Copy link
Contributor Author

simaob commented Aug 7, 2019

Done! I've left the dates out of the index table for now, as I'm not sure if it isn't too much.

@tsubik
Copy link
Contributor

tsubik commented Aug 7, 2019

Yeah, dates should not be on index page, I agree.

Copy link
Contributor

@tsubik tsubik left a comment

Choose a reason for hiding this comment

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

Great 👍

@tsubik tsubik merged commit 7a91d2f into develop Aug 7, 2019
@simaob simaob deleted the feature/register-created-by-and-updated-by branch August 8, 2019 12:48
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.

2 participants