Giter VIP home page Giter VIP logo

acts_as_hashids's People

Contributors

ardianys avatar dtaniwaki avatar finnwoelm avatar isteel avatar martin-nyaga avatar philip-maina avatar richardvenneman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

acts_as_hashids's Issues

new version release?

@dtaniwaki thank you for this gem and getting in the latest updates for Ruby 3.0/3.1 and Rails 6.1/7.0. Any chance we can get a new version release?

My Gemfile has the latest version pinned with the github repo and reference, but we ran into an issue yesterday with Heroku where it failed to resolve github.com gems and blocked any releases. It has been subsequently fixed by Heroku, but it would be helpful if we had a version bump published on rubygems.org. Thank you!

unique hashid

does this gem generate unique hashid ?
and how i can save this ids into database ?

find on `has_many` proxy will throw error if the relation doesn't include `act_as_hashids`

Description:

Given class as below

Class Base < ActiveRecord::Base
    self.abstract_class = true
    acts_as_hashids length: 4
  end

  class CoreFoo < Base
    has_many :core_bars
  end

  class CoreBar < Base
    belongs_to :core_foo
  end

In spec this will throw an error

# in spec - this will throw an error
let!(:foo1) { CoreFoo.create }

let(:bar3) { CoreBar.create core_foo: foo1 }
let(:bar4) { CoreBar.create core_foo: foo1 }

before do
    bar3
    bar4
end

context 'with normal id' do
   it 'should behave like normal AR' do
       expect(foo1.core_bars.find(bar3.id)).to eq bar3
   end
end

Error

NameError:
       undefined local variable or method `hashids' for #<ActiveRecord::Associations::CollectionProxy []>

Expected Output:

When using integer id or the real id, find should run without first try to encode to hashid and return the record

v0.2.0 fail to resolve with Activerecord 7.1.X

Ruby: 3.2.2
Rails: 7.1.3
act_as_hash_ids: 0.1.3

When relation have has_many relation it will throw this error, suspecting this have to do with Ruby 3

Failure/Error: has_many :users

NoMethodError:
  undefined method `arity' for {:extend=>[ActsAsHashids::Core::FinderMethods]}:Hash

ruby 2.7.x support?

Hi, thanks for this gem! It looks like no activity for 2+ years. Any status update?

Also, I'm curious if PR #15 or similar for ruby 2.7+ support is planned. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.