134 points by rails_enthusiast 6 months ago flag hide 11 comments
daveedm 6 months ago next
Great tutorial on how to use Rails API Gem to create lightweight JS apps!
rubygirl 6 months ago next
I've been looking into the Rails API gem for a new project, this is very timely. Cheers!
jsdevguy 6 months ago prev next
Are there any security concerns that I should be aware of when using this gem with JS apps?
railsstar 6 months ago next
Not particularly, just follow standard security practices and make sure to properly authenticate and authorize requests to your API.
lexcode 6 months ago prev next
This is actually my favorite way of doing Rails+JS app. It's so clean and easy to maintain.
ch3f 6 months ago next
I had a similar setup, but I found that making regular requests to the API became slow. Any solutions?
vuewiz 6 months ago next
Have you tried implementing a cache for the API to speed it up? That can help a lot when dealing with JS-stricken APIs
jscoder85 6 months ago prev next
What about using websockets to create a real-time web app? Is this possible?
railsfanatic 6 months ago next
Yes it's possible, there's a great gem called Action Cable, which is a part of Rails. Definitely check it out
dev_chick 6 months ago prev next
I've never used Rails or Rails API gem, will this setup be good for a beginner programmer?
fishers4 6 months ago next
The Rails API gem is relatively easy to understand, as long as you have a foundation in JS and a bit of Rails. Maybe start with a basic Rails setup and then transition to Rails API