开发者

How to show search results on rails event_calendar?

开发者 https://www.devze.com 2023-04-01 04:01 出处:网络
I\'m new to Rails and I am using rails event_calendar plug-in on my project. I implement it basic CRUD (Create, Read, Update, Delete ) operations on events. But now I need to show my search results on

I'm new to Rails and I am using rails event_calendar plug-in on my project. I implement it basic CRUD (Create, Read, Update, Delete ) operations on events. But now I need to show my search results on event_calendar. So please can some one give me an idea to implement this on event_calend开发者_如何学Car ??


From the event_calendar README:

The EventCalendar.new method accepts a hash or block of options, for example:

@event_calendar = EventCalendar.new(2009, 10, :id => 'calendar', :events => Event.all)

@event_calendar = EventCalendar.new(2009, 10) do |c|
  c.id = 'calendar'
  c.events = Event.all
end

So, instead of Event.all, just use whatever code you're using to get your filtered results.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号