Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielres opened this issue Jan 10, 2012 · 1 comment
Open

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

danielres opened this issue Jan 10, 2012 · 1 comment

Comments

@danielres
Copy link
Contributor

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
@joemsak
Copy link
Contributor

joemsak commented Jun 20, 2012

Agreed, can you please send a pull request with passing specs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants