diff --git a/Gemfile.lock b/Gemfile.lock index 696b692..9ddcef6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - refinerycms-calendar (2.0.1) + refinerycms-calendar (2.0.2) refinerycms-core (~> 2.0.3) GEM @@ -84,7 +84,6 @@ GEM activemodel (>= 3.0.0) activerecord (>= 3.0.0) paper_trail (~> 2) - growl (1.0.3) guard (1.0.3) ffi (>= 0.5.0) thor (>= 0.14.6) @@ -98,6 +97,8 @@ GEM railties (>= 3.2.0, < 5.0) thor (~> 0.14) json (1.7.3) + libnotify (0.1.4) + ffi (>= 0.6.2) libwebsocket (0.1.3) addressable mail (2.4.4) @@ -137,7 +138,8 @@ GEM rdoc (~> 3.4) thor (~> 0.14.6) rake (0.9.2.2) - rb-fsevent (0.9.1) + rb-inotify (0.8.8) + ffi (>= 0.5.0) rdoc (3.12) json (~> 1.4) refinerycms (2.0.3) @@ -245,14 +247,14 @@ DEPENDENCIES coffee-rails factory_girl_rails generator_spec - growl (~> 1.0.3) guard-spork jquery-rails jruby-openssl + libnotify (~> 0.1.3) mysql2 pg rb-fchange (~> 0.0.5) - rb-fsevent (>= 0.3.9) + rb-inotify (>= 0.5.1) rb-notifu (~> 0.0.4) refinerycms (~> 2.0.0) refinerycms-calendar! diff --git a/app/controllers/refinery/calendar/admin/events_controller.rb b/app/controllers/refinery/calendar/admin/events_controller.rb index 19a1e3d..4df5695 100644 --- a/app/controllers/refinery/calendar/admin/events_controller.rb +++ b/app/controllers/refinery/calendar/admin/events_controller.rb @@ -7,7 +7,7 @@ class EventsController < ::Refinery::AdminController crudify :'refinery/calendar/event', :xhr_paging => true, :sortable => false, - :order => "'from' DESC" + :order => "start_at DESC" private def find_venues diff --git a/app/controllers/refinery/calendar/events_controller.rb b/app/controllers/refinery/calendar/events_controller.rb index 770e6cf..0c2175e 100644 --- a/app/controllers/refinery/calendar/events_controller.rb +++ b/app/controllers/refinery/calendar/events_controller.rb @@ -2,7 +2,7 @@ module Refinery module Calendar class EventsController < ::ApplicationController def index - @events = Event.upcoming.order('refinery_calendar_events.from DESC') + @events = Event.upcoming.order('refinery_calendar_events.start_at DESC') # you can use meta fields from your model instead (e.g. browser_title) # by swapping @page for @event in the line below: @@ -18,7 +18,7 @@ def show end def archive - @events = Event.archive.order('refinery_calendar_events.from DESC') + @events = Event.archive.order('refinery_calendar_events.start_at DESC') render :template => 'refinery/calendar/events/index' end diff --git a/app/models/refinery/calendar/event.rb b/app/models/refinery/calendar/event.rb index 93f02bd..dafdd4a 100644 --- a/app/models/refinery/calendar/event.rb +++ b/app/models/refinery/calendar/event.rb @@ -7,9 +7,9 @@ class Event < Refinery::Core::BaseModel belongs_to :venue - validates :title, :presence => true, :uniqueness => true + validates :title, :presence => true - attr_accessible :title, :from, :to, :registration_link, + attr_accessible :title, :start_at, :end_at, :registration_link, :venue_id, :excerpt, :description, :featured, :position @@ -20,7 +20,7 @@ class Event < Refinery::Core::BaseModel class << self def upcoming - where('refinery_calendar_events.from >= ?', Time.now) + where('refinery_calendar_events.start_at >= ?', Time.now) end def featured @@ -28,7 +28,7 @@ def featured end def archive - where('refinery_calendar_events.from < ?', Time.now) + where('refinery_calendar_events.start_at < ?', Time.now) end end end diff --git a/app/views/refinery/calendar/admin/events/_form.html.erb b/app/views/refinery/calendar/admin/events/_form.html.erb index 2127ca9..c0e48d1 100644 --- a/app/views/refinery/calendar/admin/events/_form.html.erb +++ b/app/views/refinery/calendar/admin/events/_form.html.erb @@ -17,13 +17,13 @@