Skip to content

add has_and_belongs_to_many #364

Closed
Closed

Description

@catmando

This should work:

  def self.has_and_belongs_to_many(other, opts = {})
    has_many other, opts.merge(through: [other, table_name].sort.join('_'))
  end if RUBY_ENGINE == 'opal'

Activity

  1. catmando commented on Mar 5, 2021

    @catmando
    ContributorAuthor

    This will be added however with a shortfall that you cannot delete items in the habtm association, but must use destroy instead.

  2. added a commit that references this issue on Mar 5, 2021
    3651676
  3. added
    ready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch
    on Mar 15, 2021
  4. added a commit that references this issue on Sep 2, 2026
    478add5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions