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

Unable to display associated records #486

Open
jadamdipak opened this issue Feb 19, 2020 · 1 comment
Open

Unable to display associated records #486

jadamdipak opened this issue Feb 19, 2020 · 1 comment
Labels

Comments

@jadamdipak
Copy link

Anybody can help me, how we get associate records with_deleted scope

@haydenrou
Copy link

haydenrou commented Mar 16, 2020

Hi @jadamdipak , apologies if I'm missing your point here, but you should be able to access the deleted associations per the below:

When creating the association:
class User < ActiveRecord::Base; has_many :notifications, -> { with_deleted }; end

or explicitly
User.find(params[:id]).notifications.with_deleted

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

No branches or pull requests

3 participants