开发者

How to show search results on rails event_calendar?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜