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

Adding timestamps to users_roles is not respected #226

Open
saizai opened this issue Feb 6, 2014 · 4 comments
Open

Adding timestamps to users_roles is not respected #226

saizai opened this issue Feb 6, 2014 · 4 comments

Comments

@saizai
Copy link

saizai commented Feb 6, 2014

  1. add t.timestamps to the users_roles table in migration
  2. add a new role
  3. notice that the role got timestamps but the user_role didn't (so you don't e.g. know when the user got that role)
@koshuang
Copy link

+1

It would be better if timestamp could work.

@wldcordeiro
Copy link
Member

You wouldn't know when a user got a role, only when that role is created, just FYI.

@koshuang
Copy link

Is it a restriction or a philosophy of design ?

I am just thinking it can be tracked if we have the timestamp.

For example, assume we have two roles: user, presenter. A user can apply for a presenter. So we want to know when he or she applies.

@wldcordeiro
Copy link
Member

The timestamp would be on the Role table which would track the creation of the Role. Since the users_roles table is created as a HABTM it can't store a timestamp, if the table could instead be created as a has_many through then it would be possible to store the timestamp, the only problem being backwards compatability. So to fix this #318 would need to be fixed as well. We do take pull requests from the community. :)

@EppO EppO removed the 4.x label Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants