Comments (7)
@woller @leehericks Thanks for reporting back! I just released v0.4.1 with this fix.
from fmrest-ruby.
I am currently extending every model from this Record
parent to resolve the issue within the models but simply using the scopes finished with .count
isn't covered...
class FileMaker::Record < FmRest::Spyke::Base
def self.find(id)
query(fm_id: id).find_one
rescue FmRest::APIError::ParameterError => error
raise unless error.code == 401
nil
end
def find_one(query)
query.find_one
rescue FmRest::APIError::ParameterError => error
raise unless error.code == 401
nil
end
def find_some(query)
query.find_some
rescue FmRest::APIError::ParameterError => error
raise unless error.code == 401
[]
end
def count(query)
query.count
rescue FmRest::APIError::ParameterError => error
raise unless error.code == 401
0
end
end
from fmrest-ruby.
I just pushed a fix for this to the fix-no-matching-records-error branch (changes here: dc0a629).
Would you mind sourcing the gem from that branch and checking if it solves the issue?
from fmrest-ruby.
I will do this as soon as I get back to work on Monday.
Foolish question but this would be changing my Gemfile to point to the github branch, right?
Thank you for your prompt work on this!
from fmrest-ruby.
this would be changing my Gemfile to point to the github branch, right?
Yeah, I think this should do the trick:
gem "fmrest", github: "beezwax/fmrest-ruby", branch: "fix-no-matching-records-error"
from fmrest-ruby.
@pilaf
It works! Thank you for fixing this.
from fmrest-ruby.
@pilaf
Works on all three situations, find_one => nil, find_some => [], count => 0
Thank you for fixing this! Looking forward to a gem version push.
from fmrest-ruby.
Related Issues (20)
- FmRest::Spyke::Base#destroy should return a boolean HOT 3
- Remove Spyke dependency
- Support for FM18 new Data API features
- Support OAuth Data API authentication
- Add method for logging out of FM session HOT 1
- Add YARD inline documentation
- Add support for global fields (Data API feature) HOT 1
- Handle HTTP Data API errors
- Add an interface for running FM scripts HOT 1
- Implement CLI
- limit(1).find_some and find_one not attaching sort params to GET HOT 3
- String.match? call forces Ruby 2.4.x+ HOT 1
- Error in dependencies HOT 3
- Replace default_limit and default_sort with default_scope
- Setting attributes through their string name doesn't mark the record as dirty
- Asking an empty FmRest::Spyke::Relation if it's empty, throws a FmRest::APIError::ParameterError HOT 4
- `default_limit` should not attach `_limit` param to a find request HOT 3
- Handle HTTP 401 after one hour of inactivity in FileMaker Cloud
- Broken on Rails 7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmrest-ruby.