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

rails でpush通知を実装する #11

Open
aoronesy opened this issue Sep 10, 2019 · 0 comments
Open

rails でpush通知を実装する #11

aoronesy opened this issue Sep 10, 2019 · 0 comments

Comments

@aoronesy
Copy link

aoronesy commented Sep 10, 2019

push通知ができればよりアプリに近くかと思い調べた
OneSignalを使ったWebプッシュ通知 on Rails と言う記事を参照

以前興味本位で調べた時にServiceWorker?とかいう物が出てきてなるほど、わからん。となったのでonesignalはなんとなく簡単そうだと思い実装

記事通りに実装していくと、自分の環境のrailsにはapp/serviceというディレクトリが無かったので自分で勝手に作成していいのか、なんかコマンドか何かで作成しないと依存関係みたいなものがマズイのかと勘ぐり調べました。

Railsにおけるサービスクラスのオリジナルルール という記事を参照
モデルの肥大化を避けるための方法なんだという事でした (正直、よくわかってないですが。。。)

ローカル環境での実装
Image from Gyazo

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

1 participant