You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't want to use conventions or pass representers you can configure them on the class level using ::represents. This will also call respond_to for you.
class SingersController < ApplicationController
represents :json, Musician
I have tried removing my show method and putting in represents, like this:
include Roar::Rails::ControllerAdditions
represents :json, Company
# def show
# company = Company.find_by_id(params[:id])
# respond_with company
# end
Error is: The action 'show' could not be found for CompaniesController.
Is this supposed to allow me to eliminate the various CRUD controller methods? If not, what does it do?
The text was updated successfully, but these errors were encountered:
In the main Readme it says:
I have tried removing my
show
method and putting in represents, like this:Error is:
The action 'show' could not be found for CompaniesController
.Is this supposed to allow me to eliminate the various CRUD controller methods? If not, what does it do?
The text was updated successfully, but these errors were encountered: