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

Error if association is absent #8

Closed
kuraga opened this issue Jan 25, 2015 · 2 comments
Closed

Error if association is absent #8

kuraga opened this issue Jan 25, 2015 · 2 comments

Comments

@kuraga
Copy link
Collaborator

kuraga commented Jan 25, 2015

Good day! We have

:dataset => (proc do
  klass = constantize(send(:"#{able}_type"))
  klass.where(klass.primary_key => send(:"#{able}_id"))
end)

But an error will be thrown if association is absent (send(:"#{able}_type").nil? && send(:"#{able}_id").nil?).

In :eager_loader option's proc, similar.

Thanks!
/cc @jackdempsey @contentfree

@jackdempsey
Copy link
Owner

hi @kuraga,

Sure! I've added you as a collaborator as I don't use this personally any longer. Feel free to update as needed!

@kuraga
Copy link
Collaborator Author

kuraga commented Jun 4, 2015

@jackdempsey thanks! Watch please about my further requests like "push please to rubygems" 😄

@kuraga kuraga closed this as completed Jun 4, 2015
@kuraga kuraga reopened this Jun 9, 2015
@kuraga kuraga closed this as completed in 8417f51 Jun 9, 2015
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

No branches or pull requests

2 participants