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

Issues with mongoid #70

Open
creativecommunion opened this issue Jan 17, 2012 · 3 comments
Open

Issues with mongoid #70

creativecommunion opened this issue Jan 17, 2012 · 3 comments

Comments

@creativecommunion
Copy link

I originally was getting "undefined local variable or method has_event_calendar' for Event:Class" So, I added "include EventCalendar" to my event.rb Now I am getting "undefined methodexpand_complex_criteria' for #Array:0x000001055bf238"

Any ideas?

@richardcalahan
Copy link

Sounds like you need to restart your server?

@ghost
Copy link

ghost commented Feb 20, 2012

@creativecommunion

Did you manage to make it work or did you switch to FullCalendar ?

I spent 2 days trying to make event_calendar work with mongoid and didn't manage.

I actually have the same issue that you did.

Restarting the server doesn't change anything.

@creativecommunion
Copy link
Author

No. I'm still using event_calendar
Try this in event.rb

def self.events_for_date_range(start_d, end_d, find_options = {})

Merging find_options until https://github.com/mongoid/mongoid/issues/829 is fixed

where(find_options.merge(self.end_at_field.to_sym.lt => end_d.to_time.utc,
self.start_at_field.to_sym.gt => start_d.to_time.utc)).asc(self.start_at_field)
end

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