diff --git a/Gemfile b/Gemfile index 7c076318..2c8fd572 100644 --- a/Gemfile +++ b/Gemfile @@ -19,16 +19,16 @@ gem 'devise' gem 'cancan' # Use transitions as state machine -gem 'transitions', :require => ["transitions", "active_record/transitions"] +gem 'transitions', :require => %w( transitions active_record/transitions ) # Use acts_as_commentable_with_threading for comments gem 'acts_as_commentable_with_threading' # Use haml as templating language -gem "haml-rails" +gem 'haml-rails' # Use SCSS for stylesheets -gem "sass-rails", ">= 4.0.2" +gem 'sass-rails', '>= 4.0.2' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' @@ -52,7 +52,6 @@ gem 'gravtastic' gem 'paperclip' # Use prawn as PDF generator -gem 'prawn' gem 'prawn_rails' # Use axlsx_rails to render XLS spreadsheets @@ -64,7 +63,7 @@ gem 'd3_rails' # We use coveralls for measuring test coverage gem 'coveralls', require: false # Use a self-hosted errbit with the old notifier -gem 'hoptoad_notifier', "~> 2.3" +gem 'hoptoad_notifier', '~> 2.3' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' @@ -72,12 +71,6 @@ gem 'turbolinks' # Use active_model_serializers for JSON serializatioin our API gem 'active_model_serializers' -# Use sqlite3 as the database in development -gem 'sqlite3', group: [:development] - -# Use letter_opener to open mails in development -gem 'letter_opener', group: [:development] - # Use rspec and capybara as testing framework group :development, :test do gem 'rspec', '>= 3.0.0.beta' @@ -96,6 +89,13 @@ gem 'factory_girl_rails' # Use guard and spring for testing in development group :development do + # rspec Guard rules gem 'guard-rspec', '~> 4.2.8' gem 'spring-commands-rspec' + # Silence rack assests messages + gem 'quiet_assets' + # Use sqlite3 as the database in development + gem 'sqlite3' + # Use letter_opener to open mails in development + gem 'letter_opener' end diff --git a/Gemfile.lock b/Gemfile.lock index d9f03465..58e6d2a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -182,6 +182,8 @@ GEM coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) + quiet_assets (1.0.2) + railties (>= 3.1, < 5.0) rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) @@ -318,9 +320,9 @@ DEPENDENCIES mysql2 paper_trail paperclip - prawn prawn_rails protected_attributes + quiet_assets rails (~> 4.1) rails-observers rdoc-generator-fivefish diff --git a/app/controllers/admin/eventtypes_controller.rb b/app/controllers/admin/eventtypes_controller.rb index 53d48797..d29f78cd 100644 --- a/app/controllers/admin/eventtypes_controller.rb +++ b/app/controllers/admin/eventtypes_controller.rb @@ -13,6 +13,6 @@ class Admin::EventtypesController < ApplicationController rescue Exception => e redirect_to(admin_conference_eventtypes_path( conference_id: @conference.short_title), - alert: 'Event types update failed: #{e.message}') + alert: "Event types update failed: #{e.message}") end end diff --git a/app/views/admin/eventtypes/index.html.haml b/app/views/admin/eventtypes/index.html.haml index dfac0b33..85015d41 100644 --- a/app/views/admin/eventtypes/index.html.haml +++ b/app/views/admin/eventtypes/index.html.haml @@ -2,6 +2,6 @@ .col-md-3 = render 'admin/conference/sidebar' .col-md-9 - = semantic_form_for(@conference, :url => admin_conference_eventtype_path(@conference.short_title, @conference.event_types)) do |f| + = semantic_form_for(@conference, url: admin_conference_eventtypes_path) do |f| = dynamic_association :event_types, "Event Types", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/config/routes.rb b/config/routes.rb index 3626334b..1fdcc96f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,7 +27,11 @@ Osem::Application.routes.draw do resources :difficulty_levels, only: [:show, :update, :index] resources :rooms, only: [:show, :update, :index] resources :tracks, only: [:show, :update, :index] - resources :eventtypes, only: [:show, :update, :index] + resources :eventtypes, only: [:show, :index] do + collection do + patch :update + end + end resources :social_events, only: [:show, :update, :index] resources :supporter_levels, only: [:show, :update, :index] resources :emails, only: [:show, :update, :index]