Comments (6)
Hi @balajivenkatesh, the public method is defined here:
https://github.com/mixonic/ranked-model/blob/master/lib/ranked-model.rb#L64
Are you calling this on the base model object?
from ranked-model.
@brendon thanks for the quick response!
My gem version was 0.4.2 and the latest is 0.4.6
I updated with bundle update ranked-model
and the method is available now.
Closing issue.
from ranked-model.
Oh sorry, I see what you mean. Looks like we may have forgot to declare that method public :) Would you like to do a PR fixing this, along with a test for it?
I just see your new message now, are you sure it's working? It looks like we're defining it in the private area still.
from ranked-model.
I'm guessing this line is probably not really necessary anymore? https://github.com/mixonic/ranked-model/blob/master/lib/ranked-model.rb#L68
from ranked-model.
Yes, that line might not be necessary anymore - define_method doesn't explicitly say it but it might be the case.
https://stackoverflow.com/questions/3782026/how-do-i-dynamically-define-a-method-as-private says how private
dynamic methods can be specified
from ranked-model.
Thanks @balajivenkatesh
from ranked-model.
Related Issues (20)
- :unless option isn't documented HOT 1
- Migration docs HOT 6
- Conficts with Mobility JSONB backend HOT 6
- undefined method `<' for nil:NilClass ranker.rb:215:in `rebalance_ranks' HOT 3
- Typo in Readme? HOT 1
- v0.4.6 Error: ActiveRecord::NotNullViolation: PG::NotNullViolation: ERROR: null value in column "row_order" violates not-null constraint HOT 5
- Migration acts_as_list => ranked_model HOT 1
- Invalid SQL in `relative_rank` when order column value is nil HOT 2
- NonNilColumnDefault breaks running app when rank column has a default value HOT 7
- Race condition when inserting records HOT 5
- Publish new version to RubyGems HOT 5
- Order is incorrect when updating multiple records with accepts_nested_attributes_for HOT 5
- Creating records with ActiveRecord::Enum in rails 6.0 causes ActiveRecord::RecordNotUnique. HOT 5
- N+1 requests when outputting rank values HOT 6
- How to detect that `rearrange_ranks` or `rebalance_ranks` has been executed? HOT 3
- Is there a limit to the number of items to sort? HOT 4
- Failing to explicitly set position can lead to reordering on update HOT 3
- Unavoidable Rank N+1 Queries HOT 4
- how to find neighbor? HOT 9
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 ranked-model.