Skip to content

Some ended events don't appear in archive list #13

@danielres

Description

@danielres

When an event has ended, it should appear in the archives list, even if its start date is included in current month.

Now, it disappears from the index view because it has ended, but it doesn't yet appear in the archives list because of how the scope is defined in event model.

So here is my proposed fix:

It think this:

    def self.for_archive_list
        with_exclusive_scope { order('start_at DESC').where(['end_at < ?', Time.now.beginning_of_month]) }
    end

Should be replaced by this:

    def self.for_archive_list
        with_exclusive_scope { order('start_at DESC').where(['end_at < ?', Time.now]) }
    end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions