Does anyone have any experience using this with conditions for the
events. I set up my events to be able to be either public or private,
and there are multiple users. My goal is for a logged in user to be
able to see their public and private events, then be able to see other
users calendars with only that users public events. Anybody have any
experience with anything like that or know where I should start?
options = { "conditions" => ['permit_id = ?', @permit.id] }
@event_strips =
Project.event_strips_for_month(@shown_month,options)
I get the following error:
undefined method `>' for {"conditions"=>["permit_id = ?", 3]}:Hash
Can you please help?
Thanks.
On Feb 2, 8:19 pm, Jeff Schuil <j...@yourelevation.com> wrote:
> I know others have come across this as well. Making the find
> conditions more flexible, without having to hack the plugin, would be
> good. Maybe something similar to this fork (which you may find helpful
> in the meantime):http://github.com/kb/event_calendar/commit/36c2f6f8691b27ac7f365f9f0f...
options = { :conditions => {:permit_id => @permit.id} }
@event_strips = Project.event_strips_for_month(@shown_month,options)
But I still get the following errors:
NoMethodError in PermitsController#calendar
undefined method `>' for {:conditions=>{:permit_id=>3}}:Hash
/Users/znixon/Projects/something/vendor/plugins/event_calendar/lib/
event_calendar.rb:120:in `days_between'
/Users/znixon/Projects/something/vendor/plugins/event_calendar/lib/
event_calendar.rb:128:in `beginning_of_week'
/Users/znixon/Projects/something/vendor/plugins/event_calendar/lib/
event_calendar.rb:38:in `get_start_and_end_dates'
/Users/znixon/Projects/something/vendor/plugins/event_calendar/lib/
event_calendar.rb:22:in `event_strips_for_month'
/Users/znixon/Projects/something/app/controllers/permits_controller.rb:
67:in `calendar'