Skip to content

Instantly share code, notes, and snippets.

# Say we have a resource called Resource. We have a versioned api endpoint to return the
# properties for an individual resource. The following route describes the request:
# route GET /{current_api_version}/resource/{id}, to: :resource_shared_controller#show
#
# A controller that implements this might look like:
class ResourceSharedController
def show
@resource = Resource.find(params[:id])
render({ json: serialized_resource.to_json, status: :ok })

Keybase proof

I hereby claim:

  • I am mjroncone on github.
  • I am mjroncone (https://keybase.io/mjroncone) on keybase.
  • I have a public key ASA4hSExPJAtAtBZcSlZc2EXyk9hfQpjeEey3QFTrmO-awo

To claim this, I am signing this object: