From 44b27cb475c934289b6a3d822cc037ea729276a5 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 9 Nov 2016 16:13:56 -0500 Subject: [PATCH] updates gemfile.lock removes validations on recurring events --- Gemfile.lock | 82 ++++++++++++++++++++++----------------------- app/models/event.rb | 5 +-- 2 files changed, 41 insertions(+), 46 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74bffc1..3cced12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,8 +45,8 @@ GEM binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) builder (3.2.2) - byebug (9.0.5) - cancancan (1.13.1) + byebug (9.0.6) + cancancan (1.15.0) coderay (1.1.1) coffee-rails (4.1.1) coffee-script (>= 2.2.0) @@ -64,24 +64,24 @@ GEM multipart-post (>= 1.2, < 3) figaro (1.1.1) thor (~> 0.14) - globalid (0.3.6) + globalid (0.3.7) activesupport (>= 4.1.0) - hashie (3.4.4) + hashie (3.4.6) hirb (0.7.3) hirb-unicode (0.0.5) hirb (~> 0.5) unicode-display_width (~> 0.1.1) i18n (0.7.0) ice_cube (0.14.0) - jbuilder (2.5.0) + jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) - jquery-rails (4.1.1) + jquery-rails (4.2.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.3) - jwt (1.5.4) + jwt (1.5.6) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) @@ -91,19 +91,18 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) - minitest (5.9.0) + minitest (5.9.1) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - nokogiri (1.6.8) + nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - oauth2 (1.0.0) + oauth2 (1.2.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) multi_json (~> 1.3) multi_xml (~> 0.5) - rack (~> 1.2) + rack (>= 1.2, < 3) omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) @@ -115,9 +114,8 @@ GEM omniauth-oauth2 (1.4.0) oauth2 (~> 1.0) omniauth (~> 1.2) - pg (0.18.4) - pkg-config (1.1.7) - pry (0.10.3) + pg (0.19.0) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) @@ -157,50 +155,50 @@ GEM activesupport (= 4.2.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (11.2.2) - rdoc (4.2.2) - json (~> 1.4) + rake (11.3.0) + rdoc (4.3.0) recurring_select (2.0.0) coffee-rails (>= 3.1) ice_cube (>= 0.11) jquery-rails (>= 3.0) rails (>= 3.2) sass-rails (>= 4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-rails (3.4.2) - actionpack (>= 3.0, < 4.3) - activesupport (>= 3.0, < 4.3) - railties (>= 3.0, < 4.3) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sdoc (0.4.1) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - simple_calendar (2.1.5) + simple_calendar (2.2.0) rails (>= 3.0) slop (3.6.0) - spring (1.7.1) - sprockets (3.6.0) + spring (2.0.0) + activesupport (>= 4.2) + sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-rails (3.2.0) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -209,7 +207,7 @@ GEM tilt (2.0.5) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.0.3) execjs (>= 0.3.0, < 3) unicode-display_width (0.1.1) web-console (2.3.0) @@ -249,4 +247,4 @@ DEPENDENCIES web-console (~> 2.0) BUNDLED WITH - 1.11.2 + 1.12.5 diff --git a/app/models/event.rb b/app/models/event.rb index 1e2c5c6..5f28bd6 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -5,7 +5,7 @@ class Event < ActiveRecord::Base belongs_to :event_type belongs_to :recurring_event - validate :is_available, :is_postive_time, :room_capactity + # validate :is_available, :is_postive_time, :room_capactity validates :space_id, :start_date, :end_date, :title, :event_style, presence: true scope :unapproved, -> { where(approved: [nil, false]) } @@ -99,8 +99,5 @@ def self.update_recurring_events(params, event_params, start_date, end_date, rec def self.create_recurring_events(params, event_params, start_date, end_date) dur_in_sec, sched, occurrences = self.recurring_helper(params, event_params, start_date, end_date) rec = RecurringEvent.create!(event_params.merge(start_date: start_date, end_date: end_date, recurring_rules: sched.to_hash)) - occurrences.each do |occurrence| - rec.events.create!(event_params.merge(start_date: occurrence, end_date: occurrence + dur_in_sec.seconds)) - end end end