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

Use Alchemy.user_class's primary_key to find user. #711

Merged
merged 1 commit into from
Jan 19, 2015

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 19, 2015

The primary key to find page.creator, page.updater and page.locker is hard coded to :id, this fixes this by using the primary_key class method, that the user class provides (ie. ActiveRecord based classes).

Closes #710

The primary key to find `page.creator`, `page.updater` and `page.locker` is hard coded to `:id`, this fixes this by using the `primary_key` class method, that the user class provides (ie. ActiveRecord based classes).

Closes #710
@tvdeyen tvdeyen added this to the 3.1 milestone Jan 19, 2015
robinboening added a commit that referenced this pull request Jan 19, 2015
Use Alchemy.user_class's primary_key to find user.
@robinboening robinboening merged commit 1610865 into master Jan 19, 2015
@robinboening robinboening deleted the fix/page-users-primary-key branch January 19, 2015 22:50
@robinboening
Copy link
Contributor

Looks good! 👍 Thanks

@afdev82
Copy link
Contributor

afdev82 commented Jan 20, 2015

Thanks! ;)

tvdeyen added a commit to tvdeyen/alchemy_cms that referenced this pull request Jan 7, 2020
After we merged 24bef77 we force
Rails to connect to the database whenever we eager load the page class.

Instead we introduce a config so users with Userclass primary keys
different than :id can set it.

Refs AlchemyCMS#710
Refs AlchemyCMS#711
Refs AlchemyCMS#1658
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.

PG::UndefinedColumn: ERROR: column users.id does not exist
3 participants