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

Cannot use "find_by_name" on Rpush::Apnsp8::App #539

Open
spemmons opened this issue Dec 2, 2019 · 3 comments
Open

Cannot use "find_by_name" on Rpush::Apnsp8::App #539

spemmons opened this issue Dec 2, 2019 · 3 comments
Labels

Comments

@spemmons
Copy link

spemmons commented Dec 2, 2019

Describe the bug
Following instructions for using Redis, but while I can create a Rpush::Apnsp8::App, I cannot subsequently call Rpush::Apnsp8::App.find_by_name(...) per the README

To Reproduce
Run rails console and call Rpush::Apnsp8::App.find_by_name('test') and receive the following error:

2.6.5 :013 > Rpush::Apnsp8::App.find_by_name('test')
Traceback (most recent call last):
        1: from (irb):13
NoMethodError (undefined method `find_by_name' for Rpush::Client::Redis::Apnsp8::App:Class)
Did you mean?  find_all

Expected behavior
Expect find_by_name to work just like before using ActiveRecord.

Logs and other output
N/A

System configuration (please complete the following information):

  • OS: macOS
  • OS version: 10.14.6
  • Ruby version: 2.6.5
  • Rails version: 5.2.2.1
  • Rpush version: 4.1.1

Additional context
Add any other context about the problem here.

@spemmons
Copy link
Author

spemmons commented Dec 2, 2019

apparently .where(name: 'test').first works, so i'm going to switch over to using that -- i don't really care what the mechanics are -- i was just confused about what to use -- it might be nice to update the docs to not be ActiveRecord-centric -- i'll let someone else close when/if there is any response to these comments...

cheers!

@CR4567
Copy link

CR4567 commented Aug 13, 2020

Rpush::Apnsp8::App.find_by_name still works for me.
Ruby 2.5 / Rails 6.0.3

Did you switch from AR to Redis? Maybe that's your problem

@stale
Copy link

stale bot commented Oct 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please leave another comment. This issue will be closed if no further activity occurs.
Thank you for all your contributions!

@stale stale bot added the stale label Oct 12, 2021
@aried3r aried3r removed the stale label Oct 18, 2021
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

4 participants