Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix tests for actions
class Api::ProductsController < ApplicationController
private
def collection
@products ||= Product.all
end
def resource
@product ||= Product.find params[:id]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment