Skip to content

Does not redis_orm support HABTM?  #5

@satoryu

Description

@satoryu

I created 2 models

class User < RedisOrm::Base
  property :name, String

  has_many :books
end

class Book < RedisOrm::Base
  property :title, String

  has_many :users, as: :authors
end

And

user = User.create(name: 'Kent Beck')
user.books << Book.create(title: 'Refactoring')

But this code fails as follows:

       undefined method `pluralize' for :authors:Symbol

How should I do in this case?
has_many looks like not support HABTM
https://github.com/german/redis_orm/blob/master/lib/redis_orm/associations/has_many.rb#L7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions