This is a example Ruby on Rails app which makes use of the ruby client gem implementation for the fantastic Rick & Morty Api by Afuh
git clone https://github.com/spielhoelle/rick-and-morty-gem-examle-app
cd rick-and-morty-gem-examle-app
bundle install
bundle exec rails server
open localhost:3000
to see all the queried endpoints in the frontend.
Example queries in the WelcomeController:
class WelcomeController < ApplicationController
protect_from_forgery with: :exception
def index
@all_episodes = Rickmorty::Episode.new.all
@all_characters = Rickmorty::Character.new.all
@all_locations = Rickmorty::Location.new.all
@rick = Rickmorty::Character.new.by_id(1)
@morty = Rickmorty::Character.new.by_id(2)
end
end