Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Rails scaffolding expects a find method that accepts a bare id but Fauna::Class find needs a full ref, not a bare id #20

stevej opened this Issue · 2 comments

3 participants

Steve Jenson Matt Freels Evan Weaver
Steve Jenson

I created a model object called Blog.

Blog.find(params[:id]) was failing with a 404 asking for a bare ref. the console showed the following:

Fauna GET("29178235604434944")

Switching to find_by_id(params[:id]) fixed the problem.

Matt Freels

sounds like we need to rethink the finder names.

Steve Jenson

An alternative is to check for Number and do a find_by_id. I'm sure you don't want a zillion special cases like ActiveRecord has but a few niceties could make things smoother.

Evan Weaver evan closed this issue from a commit in fauna/fauna-ruby
Evan Weaver evan Default finder finds by id. Closes fauna/issues#20. baae947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.