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

Already on GitHub? Sign in to your account

Issues with mongoid #70

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

Comments

Projects
None yet
2 participants

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?

Sounds like you need to restart your server?

@ghost

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.

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