Skip to content

Allow multi-level STI #82

@meacuna

Description

@meacuna

If you have this scenario

class User
    acts_as_reader
end
class A
    acts_as_readable on: :created_at
end

class A < B
end

class B < C
end

And try to do something like

user = User.create!
c = C.create!

# Assume A.last is the same record as c
a = A.last
a.mark_as_read!(for: user)
user.have_read?(c)
# Expect true, but got false

I think it has to do with readable_parent behaviour.

I made a pull request to address this issue.

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