Coder Social home page Coder Social logo

elevation / event_calendar Goto Github PK

View Code? Open in Web Editor NEW
951.0 951.0 213.0 624 KB

Show multiple, overlapping events across calendar days and rows. Rails plugin.

Home Page: http://dev.elevationblog.com/2009/7/23/event-calendar-rails-plugin

License: MIT License

Ruby 79.21% JavaScript 20.79%

event_calendar's People

Contributors

dshimy avatar felipediesel avatar huerlisi avatar jamezilla avatar jeffschuil avatar jpemberthy avatar jque avatar nhocki avatar no0p avatar phallstrom avatar robertlowe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

event_calendar's Issues

undefined method `[]' for Thu, 01 Sep 2011:Date

Hello,

I'm trying to use your event calendar plugin to display a series of deals that we run over the course of a month. I've implemented it to the best of my ability in our setup, and when I attempt to insert "= event_calendar" into the appropriate view, I get the following error:

undefined method `[]' for Thu, 01 Sep 2011:Date

I'm not really sure what's causing the problem. Here's the setup. The LiveDeal model is what takes the has_event_calendar:

has_event_calendar :start_at_field => 'start_time', :end_at_field => 'end_time'

I have a calendar_controller that I'm using to handle this and some other calendar functions. The method in that controller is as follows:

  def market
    authorize! :read, :deals

    if !params[:id]
      flash[:notice] = "You must select a market"
      redirect_to request.referrer
      return
    end

    @market = Market.find(params[:id])
    @month = (params[:month] || Time.zone.now.month).to_i
    @year = (params[:year] || Time.zone.now.year).to_i

    @shown_month = Date.civil(@year, @month)

    @event_strips = @market.live_deals.event_strips_for_month(@shown_month)
  end

My calendar helper, with a few slight modifications to represent our paths:

module CalendarHelper
  def month_link(month_date)
    link_to(I18n.localize(month_date, :format => "%B"), {:month => month_date.month, :year => month_date.year})
  end

  # custom options for this calendar
  def event_calendar_options
    { 
      :year => @year,
      :month => @month,
      :event_strips => @event_strips,
      :month_name_text => I18n.localize(@shown_month, :format => "%B %Y"),
      :previous_month_text => "<< " + month_link(@shown_month.prev_month),
      :next_month_text => month_link(@shown_month.next_month) + " >>"
    }
  end

  def event_calendar
    calendar event_calendar_options do |args|
      deal = args[:event]
      %(<a href="/admin/reports/deal_details/#{deal.id}/" title="#{h(deal.subject)}">#{h(deal.subject)}</a>)
    end
  end
end

And finally the call in the view (using HAML):

= event_calendar

My guess is that for some reason the helper method isn't actually getting any "event" data to parse. If I try something like:

= event_calendar(@event_strips)

I get a "wrong number of arguments" error. Any help would be appreciated.

Thanks

Option to distinguish 'All Day' events

New option to display events marked as 'All Day' differently from those that aren't.

For example, iCal:

  • uses a filled in bar for All Day
  • bullet point for others

This would necessitate an additional 'All Day' field on the Event model.

use-jquery not working

I used the command:

bhelx$ rails generate event_calendar --use-jquery

and it tells me:

Using jQuery for scripting
create public/javascripts/event_calendar.js
............
............

But it still uses prototype. Afterwards I run the command:

bhelx$ rails destroy event_calendar

and it tells me:

Using Prototype for scripting
remove public/javascripts/event_calendar.js
............
............

this is Ruby 1.9.2 and Rails 3.0.9

ORM Agnostic

How hard is it to make this plugin DB agnostic? Does it have to rely on ActiveRecord?

Performance issues for many events/day

My use case has up to 20 events/day and increasing. I notice that cycling back in time by month takes a lot of time to load the page. I understand it's doing a lot of logic per day, but it is currently crashing Chrome and is choking Safari noticeably. Anything I can do to improve this?

Kimball

Pluralisation not working if using custom model names

Hi,

I just tried to do something like this

rails g event_calendar illness --use-jquery --use-all-day --use-color

and ended up with a model illnes and a migration with the same name instead of illnesses.

Using rails 3.0.9 on ruby 1.9.2.

My issue is loading seraching results on event calendar

I implement event calendar on my rails application (Rails 2.3.8) and I need to show my search result on event calendar. But default it loads all the events at the database so how can I specify the events that I need to show on calendar ?

Undefined method `last_month' - Calendar Helper

Hi Jeff,

Thanks for the routes help. That worked...Now I have another error.

Error:

ActionView::Template::Error (undefined method `last_month' for Wed, 01 Dec 2010:Date):

Here's my calendar helper. (using Rails 3). When I comment out the :previous_month_text, it works but otherwise it gives me the error above.

def event_calendar_opts
{
:year => @year,
:month => @month,
:event_strips => @event_strips,
:event_height => 16 ,
:day_names_height => 20,
:event_padding_top => 0,
:first_day_of_week => @first_day_of_week ,
:month_name_text => I18n.localize(@shown_month, :format => "%B %Y"),
:previous_month_text => "<< " + month_link(@shown_month.last_month),
:next_month_text => month_link(@shown_month.next_month) + " >>" }
end

Thanks

regular events

I havnt found anything in the docs but the definition of regular events (every year, every x month) would be good.
For "every year" some boolean tag could be enough.

events by user

I have an app where I'm using this calendar for each user. I have added user_id column in my events model but how can I filter the events by user_id? So that it will only show the events for the user who is logged in and not everybody else's event?

Event model name change is not reflected in links

I'm using a custom event model name, and I'm having trouble getting the event strip links to change their path. They still link to "/events/" even though I have "projects" and not "events". I tried changing line 239 of calendar_helper.rb but it has no effect. Where is this being set? Thanks in advance, G

Calendar helper use concat function on Array

Line number 95 -- file event_calendar/lib/event_calendar/calendar_helper.rb we have
day_names.concat(I18n.translate(:'date.abbr_day_names'))

day_names is empty array and class Array don't have concat method. Ruby ruby 1.9.3dev (2010-07-01 trunk 28517) [x86_64-linux] say "Cannot convert String to Array".

Invalid HTML due to ID tags

I'm using the edge code (from github) because I'm running a Mongoid project and to make things more difficult I'm using RightJS (http://rightjs.org) framework to do the highlighting. So I re-wrote the javascript for event_calendar and noticed that the JS looks for a class starting with .ec-event-event_id, however that is the ID of the div and not the class. I believe this makes the HTML not valid due to the fact that IDs have to be unique and on events that last for 2 weeks, you'd get the same ID twice.

P.S. I will try to copy your mootool JS setup for RightJS so you can support that JS framework as well. However need to make sure that what I did will work first. ;)

Andrew

Doesn't show all events

Hi,

I'm not sure if it's a specific bug with my application, but the events for the upcoming month don't fully show up on the current month. For instance if the events are on the 27,28,29,30,1,2,3 dates. The events show up correctly for all the dates except the 3rd (On a Saturday). The events on the 1st and 2nd show up fine. I'm not sure if it is supposed to be like this.

Thanks.

Can we make "start_at" & "end_at" dynamic?

I am using event_calendar on my own model (not Events) that doesn't contain a "start_at" or "end_at" field. Actually, it contains quite a few date fields and I want to be able to pick and choose which ones show up on the calendar. However, it looks like event_calendar is hardcoded to use these two fields.

Is there any way to make these field names selectable at runtime? That way I could use my existing model and/or build several calendars each with different types of "events".

Events disappearing when using :first_day_of_week => 1

The title says it all I think. Just started a new rails project with event_calendar, and suddenly all my events disappeared from the calendar view. I tracked it down to the :first_day_of_week => 1 setting I added in event_calendar_opts. I'm also using the use_all_day feature, if that might have something to do with this problem.

Event name line wrapping option

If an event name is longer than the calendar cell's width, have the name wrap onto multiple lines, as needed. Currently the event name stays on a single line, with the extra text hidden. Keep this the default functionality.

Complicated due to how the calendar calculates row heights. It assumes one line per event.

Also, set a limit to how many lines it can wrap?

Version 2.0 vs. 2.2

I had to download v2.0 and install it to get this to work in Rails 2.3.8. It seems some of the generators got broke when you made it compatible with Rails 3. Just a heads up.

More then one type of event

You could make it easy to have more then one type of event by make the following changes:

in app/helpers/calendar_helper.rb use event.class.to_s.downcase.pluralize instead of hardcoding the name of the model name

and in vendor/plugins/event_calendar/lib/event_calendar/calendar_helper.rb make the event_id be event_modelname_id so the hover highlight will not highlight events from different models by using event.class.to_s.downcase

Having error when loading event_calendar.js

Hi,

I am using event_calendar gem in my rails 3.0.7 application. It showing error as
"Uncaught TypeError: Object function Event() { [native code] } has no method 'observe'" at line 5 in event_calendar.js.
Any fix for this error?

Thank u..

Dynamic height resizing option

It would be nice there was an option to have the height resize with it's containing element.

For example, as the window height gets smaller, the calendar height would shrink as well, up to a point. Similarly to how the width resizing now works.

Not working with non-ActiveRecord databases

I am using MongoDB with MongoMapper adapter. I keep getting "undefined method `has_event_calendar'" error as my Event class is not descendant from "< ActiveRecord::Base". Any workarounds?

Bounds enforcing?

So, your code assumes shown_date is the beginning of the month. It would be better if it assumed a valid date then set the first of the month internally.

def get_start_and_end_dates(shown_date)
  # the end of last month
  shown_date = Date.civil(shown_date.year, shown_date.month, 1)
  strip_start = beginning_of_week(shown_date)
  # the beginning of next month
  strip_end = beginning_of_week(shown_date.next_month + 7) - 1
  [strip_start, strip_end]
end

Calendar Off by 2 days.

Nor sure why but all events show up in calendar to day early.

i.e event datetime = 2009-10-05 00:00:00 shows up on the calendar on the 3rd.

also is there a way to set the end_at to the same as the start_at time.

I only need the date not the time.

Thanks

Year mode view

Hi,

I need to show all months of a specific year on my application. In this case, the navigation should be by year and not by month.

Is this possible?

undefined local variable or method `has_event_calendar'

I hav installed the gem, and now am trying to restart my web server.

The error line is as follows:
/usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:1008:in method_missing_without_paginate': undefined local variable or methodhas_event_calendar' for #Class:0x10303d9d8 (NameError)

Routes in Rails 3

Hello,
What is the proper routes syntax to use event_calendar in Rails 3 ?

The following is not working for me. I am getting this error below:
ActionController::RoutingError (No route matches "/calendar"):

Here's my routes code:

match '/calendar/:year/:month' => 'calendar#index', :as => :calendar , :requirements => {:year => /d{4}/, :month => /d{1,2}/}

Thanks,

Jeremie

setting event-color

How do you set the color of the event bar in the calendar? All my events are #9aa4ad, but in your example jpeg, the events all have different colors.

How to use i18n locale?

Hello,

I would like to see month numbers in my language. I have a pl.yml (polish) in /config/locales/

I've also included in my locale file the standard date formats and more.

  date:
  formats:
  default: "%Y-%m-%d"
  short: "%d %b"
  long: "%d %B %Y"

  day_names: [Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota]
  abbr_day_names: [nie, pon, wto, śro, czw, pia, sob]

  month_names: [~, Styczeń, Luty, Marzec, Kwiecień, Maj, Czerwiec, Lipiec, Sierpień, Wrzesień, Październik, Listopad, Grudzień]
  abbr_month_names: [~, sty, lut, mar, kwi, maj, cze, lip, sie, wrz, paź, lis, gru]
  order: [ :year, :month, :day ]

Plugin instalation failed

[wr@bublik rubyclub]$ script/plugin install git://github.com/elevation/event_calendar.git
Plugin not found: ["git://github.com/elevation/event_calendar.git"]

Rails 2.3.8 generator failed

[wr@bublik rubyclub]$ script/generate event_calendar
/home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems.rb:233:in activate': can't activate activesupport (= 3.0.0.beta3, runtime) for ["railties-3.0.0.beta3"], already activated activesupport-2.3.8 for ["rails-2.3.8"] (Gem::LoadError) from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems.rb:249:inactivate'
from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems.rb:248:in each' from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems.rb:248:inactivate'
from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in require' from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire'
from /home/wr/Public/rubyclub/vendor/plugins/event_calendar/lib/generators/event_calendar/event_calendar_generator.rb:1
from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_constants_in'
from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.8/lib/rails_generator/spec.rb:17:inklass'
from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.8/lib/rails_generator/lookup.rb:140:in instance' from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.8/lib/rails_generator/scripts/../scripts.rb:31:inrun'
from /home/wr/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.8/lib/commands/generate.rb:6
from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /home/wr/.rvm/rubies/ree-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from script/generate:3

Entity Character Typo

In the calendar header the left arrows are output as "<<" and the right arrows are output as ">>"

Missing backslashes in route RegEx

This is the Rails 2.x version. I was having problems with my routes after installing the plugin, and finally I tracked it down to missing backslashes in the requirements for the route. The generator created this:

map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :requirements => {:year => /d{4}/, :month => /d{1,2}/}, :year => nil, :month => nil

But it really should be this:

map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/}, :year => nil, :month => nil

Hope that helps! --Jared

Event has no method 'observe'

Uncaught TypeError: Object function Event() { [native code] } has no method 'observe', getting this error in event_calendar.js

Plugin not found: ["git://github.com/elevation/event_calendar.git"]

Hello,
I am trying to install the Event Calendar plugin in my already created rails application. I am using the readme file given on link "https://github.com/elevation/event_calendar#readme".

But while executing the command  : $ ruby  script/plugin install git://github.com/elevation/event_calendar.git , i am getting the above error  meassage  : Plugin not found: ["git://github.com/elevation/event_calendar.git"]

I have installed rails 2.0.2 & ruby 1.8.6. on my windows 7 machine.

Please, can anyone tell me what is the problem? Either i am missing something in it or is the problem comming from github server?
Any help would be appiciate....!!

Adding custom actions upon event creation

Is there a way to have a callback to a function when an event is created? Similarly, is there a way to add custom fields to an event you are creating. For example, instead of just description of an event, can we have First Name, Last Name etc.... as if it was an appointment calender that stores info about the people you have appointments with?

calendar_path Generates Bad Route

The named route for the calendar root generates a bad route:
map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :year => Time.zone.now.year, :month => Time.zone.now.month

calendar_path => /calendar//

Cannot install

Rails 2.3.5 on Ruby 1.8.7 - After installing the plugin the generator fails

script/generate event_calendar Event CalendarController --user-jquery
 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rails/generators/migration (MissingSourceFile)
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/jjones/Development/web/Agensys/vendor/plugins/event_calendar/lib/generators/event_calendar/event_calendar_generator.rb:1
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /home/jjones/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/jjones/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails_generator/spec.rb:17:in `klass'
    from /home/jjones/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails_generator/lookup.rb:140:in `instance'
    from /home/jjones/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails_generator/scripts/../scripts.rb:31:in `run'
    from /home/jjones/.gem/ruby/1.8/gems/rails-2.3.5/lib/commands/generate.rb:6
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/generate:3

link_to_day_action sends to wrong date

If you use the link_to_day_action property, it will send to the wrong date if you click on a day link that is not in the current month.

For example, if I am currently looking at January of 2010 and I click on the day link for December 31st 2009, it will not send me to the correct day. Instead of ~day/2009/12/31 it will send to ~day/2010/1/31.

Not sure if there is a workaround since I am a noob to rails. Any help would be appreciated.

Thanks for sharing the calendar.

:first_day_of_week causes problem

when changed form 0 to 1 it doesn't show any event

I discovered that around line 202 in calendar_helper there is:

    if dates[0] == day.to_date

and that requirement is not met so i changed code at line 195

    day = first_day_of_week + index  

to
day = first_day_of_week + index - options[:first_day_of_week]

It starts render events BUT not in appropriate columns. (moved by 1 to right)

I don't know how to fix it because I don't have any idea how the freaky strip method works in this code :-)

regards
Piotr Mąsior

Mongoid support example

Can you please add a basic example for the mongoid in the wiki ? I am getting a few errors looks like I am missing something.

Having error when loading event_calendar.js

Hi,

I am using event_calendar gem in my rails 3.0.7 application. It showing error as
"Uncaught TypeError: Object function Event() { [native code] } has no method 'observe'" at line 5 in event_calendar.js.
Any fix for this error?

Thank u..

Readme documentation

You don't need to do gem install 'event-calendar' if your using rails 3. Because, if you put it in your Gemfile and then run bundle install it will install the gem for you. Very minor and I'm sure you know this already, just sayin.

suggest event_calendar helper modify to

def event_calendar
  calendar event_calendar_opts do |args|
    event = args[:event]
    link_to event.name, event, :title => event.name, :target => :_blank   # [:admin, event]
  end
end

Typo in Readme

Love this plugin, btw.
Under the install options the three bullets have dashes instead of double hyphens.

Instead of :

—static-only

It should be :

--static-only

No PluginMethods submodule

After upgrading event_calendar with script/plugin install --force server crashed with error

/home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in load_missing_constant': uninitialized constant EventCalendar::PluginMethods (NameError) from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:inconst_missing'
from /home/pawel/ruby/rails/fse/vendor/plugins/event_calendar.old/init.rb:1:in evaluate_init_rb' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin.rb:158:inevaluate_init_rb'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin.rb:154:inevaluate_init_rb'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin.rb:48:in load' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin/loader.rb:38:inload_plugins'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:in each' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:inload_plugins'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/initializer.rb:369:in load_plugins' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/initializer.rb:165:inprocess'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/initializer.rb:113:in send' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/initializer.rb:113:inrun'
from /home/pawel/ruby/rails/fse/config/environment.rb:9
from /home/pawel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /home/pawel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_constants_in'
from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /home/pawel/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.8/lib/commands/server.rb:84 from /home/pawel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /home/pawel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3

Adding this to event_calendar.rb helped:

module PluginMethods
end

Disappearing events when :first_day_of_week > 0

When I try to change the value of :first_day_of_week bigger than 0 events are starting to disappear.

I have used it to show calendar for my Project model only which has: start_at, end_at and in project.rb:
has_event_calendar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.