Merge 598606547e into eda5c2bc07
This commit is contained in:
commit
1b7c61e435
14 changed files with 136 additions and 39 deletions
8
Gemfile
8
Gemfile
|
|
@ -52,7 +52,11 @@ gem 'uglifier', '>= 1.3.0'
|
||||||
gem 'bootstrap-sass', '~> 3.3.4.1'
|
gem 'bootstrap-sass', '~> 3.3.4.1'
|
||||||
gem 'autoprefixer-rails'
|
gem 'autoprefixer-rails'
|
||||||
gem 'formtastic-bootstrap'
|
gem 'formtastic-bootstrap'
|
||||||
|
<<<<<<< HEAD
|
||||||
|
gem 'formtastic', '~> 2.3.0.rc3'
|
||||||
|
=======
|
||||||
gem 'formtastic', '~> 3.1.1'
|
gem 'formtastic', '~> 3.1.1'
|
||||||
|
>>>>>>> upstream/master
|
||||||
gem 'cocoon'
|
gem 'cocoon'
|
||||||
|
|
||||||
# frontend javascripts
|
# frontend javascripts
|
||||||
|
|
@ -85,6 +89,10 @@ end
|
||||||
gem 'bootstrap3-datetimepicker-rails', '~> 3.0.2'
|
gem 'bootstrap3-datetimepicker-rails', '~> 3.0.2'
|
||||||
gem 'jquery-datatables-rails', '~> 2.2.1'
|
gem 'jquery-datatables-rails', '~> 2.2.1'
|
||||||
# for charts
|
# for charts
|
||||||
|
<<<<<<< HEAD
|
||||||
|
gem 'd3_rails'
|
||||||
|
=======
|
||||||
|
>>>>>>> upstream/master
|
||||||
gem 'chart-js-rails'
|
gem 'chart-js-rails'
|
||||||
|
|
||||||
# for user avatars
|
# for user avatars
|
||||||
|
|
|
||||||
50
Gemfile.lock
50
Gemfile.lock
|
|
@ -9,6 +9,17 @@ GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
remote: https://rails-assets.org/
|
remote: https://rails-assets.org/
|
||||||
specs:
|
specs:
|
||||||
|
<<<<<<< HEAD
|
||||||
|
actionmailer (4.2.5.1)
|
||||||
|
actionpack (= 4.2.5.1)
|
||||||
|
actionview (= 4.2.5.1)
|
||||||
|
activejob (= 4.2.5.1)
|
||||||
|
mail (~> 2.5, >= 2.5.4)
|
||||||
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
|
actionpack (4.2.5.1)
|
||||||
|
actionview (= 4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
=======
|
||||||
actionmailer (4.2.5.2)
|
actionmailer (4.2.5.2)
|
||||||
actionpack (= 4.2.5.2)
|
actionpack (= 4.2.5.2)
|
||||||
actionview (= 4.2.5.2)
|
actionview (= 4.2.5.2)
|
||||||
|
|
@ -18,18 +29,37 @@ GEM
|
||||||
actionpack (4.2.5.2)
|
actionpack (4.2.5.2)
|
||||||
actionview (= 4.2.5.2)
|
actionview (= 4.2.5.2)
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
|
>>>>>>> upstream/master
|
||||||
rack (~> 1.6)
|
rack (~> 1.6)
|
||||||
rack-test (~> 0.6.2)
|
rack-test (~> 0.6.2)
|
||||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
actionview (4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
=======
|
||||||
actionview (4.2.5.2)
|
actionview (4.2.5.2)
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
|
>>>>>>> upstream/master
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
active_model_serializers (0.8.1)
|
active_model_serializers (0.8.1)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
activejob (4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
globalid (>= 0.3.0)
|
||||||
|
activemodel (4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
builder (~> 3.1)
|
||||||
|
activerecord (4.2.5.1)
|
||||||
|
activemodel (= 4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
arel (~> 6.0)
|
||||||
|
activesupport (4.2.5.1)
|
||||||
|
=======
|
||||||
activejob (4.2.5.2)
|
activejob (4.2.5.2)
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
globalid (>= 0.3.0)
|
globalid (>= 0.3.0)
|
||||||
|
|
@ -41,6 +71,7 @@ GEM
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
arel (~> 6.0)
|
arel (~> 6.0)
|
||||||
activesupport (4.2.5.2)
|
activesupport (4.2.5.2)
|
||||||
|
>>>>>>> upstream/master
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
json (~> 1.7, >= 1.7.7)
|
json (~> 1.7, >= 1.7.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
|
|
@ -316,6 +347,18 @@ GEM
|
||||||
ruby-openid (>= 2.1.8)
|
ruby-openid (>= 2.1.8)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
rails (4.2.5.1)
|
||||||
|
actionmailer (= 4.2.5.1)
|
||||||
|
actionpack (= 4.2.5.1)
|
||||||
|
actionview (= 4.2.5.1)
|
||||||
|
activejob (= 4.2.5.1)
|
||||||
|
activemodel (= 4.2.5.1)
|
||||||
|
activerecord (= 4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
bundler (>= 1.3.0, < 2.0)
|
||||||
|
railties (= 4.2.5.1)
|
||||||
|
=======
|
||||||
rails (4.2.5.2)
|
rails (4.2.5.2)
|
||||||
actionmailer (= 4.2.5.2)
|
actionmailer (= 4.2.5.2)
|
||||||
actionpack (= 4.2.5.2)
|
actionpack (= 4.2.5.2)
|
||||||
|
|
@ -326,6 +369,7 @@ GEM
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
bundler (>= 1.3.0, < 2.0)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
railties (= 4.2.5.2)
|
railties (= 4.2.5.2)
|
||||||
|
>>>>>>> upstream/master
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
rails-assets-date.format (1.2.3)
|
rails-assets-date.format (1.2.3)
|
||||||
rails-assets-holderjs (2.9.1)
|
rails-assets-holderjs (2.9.1)
|
||||||
|
|
@ -349,9 +393,15 @@ GEM
|
||||||
loofah (~> 2.0)
|
loofah (~> 2.0)
|
||||||
rails-observers (0.1.2)
|
rails-observers (0.1.2)
|
||||||
activemodel (~> 4.0)
|
activemodel (~> 4.0)
|
||||||
|
<<<<<<< HEAD
|
||||||
|
railties (4.2.5.1)
|
||||||
|
actionpack (= 4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
|
=======
|
||||||
railties (4.2.5.2)
|
railties (4.2.5.2)
|
||||||
actionpack (= 4.2.5.2)
|
actionpack (= 4.2.5.2)
|
||||||
activesupport (= 4.2.5.2)
|
activesupport (= 4.2.5.2)
|
||||||
|
>>>>>>> upstream/master
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rainbow (2.1.0)
|
rainbow (2.1.0)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ class ApplicationController < ActionController::Base
|
||||||
before_filter :get_conferences
|
before_filter :get_conferences
|
||||||
before_filter :store_location
|
before_filter :store_location
|
||||||
helper_method :date_string
|
helper_method :date_string
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
|
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
|
||||||
check_authorization unless: :devise_controller?
|
check_authorization unless: :devise_controller?
|
||||||
|
|
||||||
|
|
@ -52,16 +54,14 @@ class ApplicationController < ActionController::Base
|
||||||
rescue_from IChainRecordNotFound do
|
rescue_from IChainRecordNotFound do
|
||||||
Rails.logger.debug('IChain Record was not Unique!')
|
Rails.logger.debug('IChain Record was not Unique!')
|
||||||
sign_out(current_user)
|
sign_out(current_user)
|
||||||
flash[:error] = 'Your E-Mail adress is already registered at OSEM. Please contact the admin if you want to attach your openSUSE Account to OSEM!'
|
redirect_to root_path(@ user), error: "Your E-Mail adress is already registered at OSEM. Please contact the admin if you want to attach your openSUSE Account to OSEM!"
|
||||||
redirect_to root_path
|
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_from UserDisabled do
|
rescue_from UserDisabled do
|
||||||
Rails.logger.debug('User is disabled!')
|
Rails.logger.debug('User is disabled!')
|
||||||
sign_out(current_user)
|
sign_out(current_user)
|
||||||
mail = User.admin.first ? User.admin.first.email : 'the admin!'
|
mail = User.admin.first ? User.admin.first.email : 'the admin!'
|
||||||
flash[:error] = "This User is disabled. Please contact #{mail}!"
|
redirect_to User.ichain_logout_url(@ user), error: "This User is disabled. Please contact #{mail}!"
|
||||||
redirect_to User.ichain_logout_url
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def not_found
|
def not_found
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ class CommercialsController < ApplicationController
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
before_action :set_event
|
before_action :set_event
|
||||||
load_and_authorize_resource through: :event
|
load_and_authorize_resource through: :event
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@commercial = @event.commercials.build(commercial_params)
|
@commercial = @event.commercials.build(commercial_params)
|
||||||
|
|
@ -11,8 +13,7 @@ class CommercialsController < ApplicationController
|
||||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||||
notice: 'Commercial was successfully created.'
|
notice: 'Commercial was successfully created.'
|
||||||
else
|
else
|
||||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -21,8 +22,7 @@ class CommercialsController < ApplicationController
|
||||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||||
notice: 'Commercial was successfully updated.'
|
notice: 'Commercial was successfully updated.'
|
||||||
else
|
else
|
||||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content')
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ class ConferenceRegistrationsController < ApplicationController
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
authorize_resource :conference_registrations, class: Registration
|
authorize_resource :conference_registrations, class: Registration
|
||||||
before_action :set_registration, only: [:edit, :update, :destroy, :show]
|
before_action :set_registration, only: [:edit, :update, :destroy, :show]
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def new
|
def new
|
||||||
# Redirect to registration edit when user is already registered
|
# Redirect to registration edit when user is already registered
|
||||||
|
|
@ -60,16 +62,14 @@ class ConferenceRegistrationsController < ApplicationController
|
||||||
sign_in(@registration.user)
|
sign_in(@registration.user)
|
||||||
end
|
end
|
||||||
|
|
||||||
flash[:notice] = 'You are now registered and will be receiving E-Mail notifications.'
|
|
||||||
if @conference.tickets.any? && !current_user.supports?(@conference)
|
if @conference.tickets.any? && !current_user.supports?(@conference)
|
||||||
redirect_to conference_tickets_path(@conference.short_title)
|
redirect_to conference_tickets_path(@conference.short_title), notice: 'You are now registered and will be receiving E-Mail notifications.'
|
||||||
else
|
else
|
||||||
redirect_to conference_conference_registrations_path(@conference.short_title)
|
redirect_to conference_conference_registrations_path(@conference.short_title), notice: 'You are now registered and will be receiving E-Mail notifications.'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = "Could not create your registration for #{@conference.title}: "\
|
render :new, error: "Could not create your registration for #{@conference.title}: "\
|
||||||
"#{@registration.errors.full_messages.join('. ')}."
|
"#{@registration.errors.full_messages.join('. ')}."
|
||||||
render :new
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -78,9 +78,8 @@ class ConferenceRegistrationsController < ApplicationController
|
||||||
redirect_to conference_conference_registrations_path(@conference.short_title),
|
redirect_to conference_conference_registrations_path(@conference.short_title),
|
||||||
notice: 'Registration was successfully updated.'
|
notice: 'Registration was successfully updated.'
|
||||||
else
|
else
|
||||||
flash[:error] = "Could not update your registration for #{@conference.title}: "\
|
render :edit, error: "Could not update your registration for #{@conference.title}: "\
|
||||||
"#{@registration.errors.full_messages.join('. ')}."
|
"#{@registration.errors.full_messages.join('. ')}."
|
||||||
render :edit
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -100,8 +99,7 @@ class ConferenceRegistrationsController < ApplicationController
|
||||||
def set_registration
|
def set_registration
|
||||||
@registration = Registration.find_by(conference: @conference, user: current_user)
|
@registration = Registration.find_by(conference: @conference, user: current_user)
|
||||||
if !@registration
|
if !@registration
|
||||||
flash[:alert] = "Can't find a registration for #{@conference.title} for you. Please register."
|
redirect_to new_conference_conference_registrations_path(@conference.short_title), alert: "Can't find a registration for #{@conference.title} for you. Please register."
|
||||||
redirect_to new_conference_conference_registrations_path(@conference.short_title)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ class ProposalController < ApplicationController
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
load_resource :program, through: :conference, singleton: true
|
load_resource :program, through: :conference, singleton: true
|
||||||
load_and_authorize_resource :event, parent: false, through: :program
|
load_and_authorize_resource :event, parent: false, through: :program
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@events = current_user.proposals(@conference)
|
@events = current_user.proposals(@conference)
|
||||||
|
|
@ -31,8 +33,7 @@ class ProposalController < ApplicationController
|
||||||
if @user.save
|
if @user.save
|
||||||
sign_in(@user)
|
sign_in(@user)
|
||||||
else
|
else
|
||||||
flash[:error] = "Could not save user: #{@user.errors.full_messages.join(', ')}"
|
render action: 'new', error: "Could not save user: #{@user.errors.full_messages.join(', ')}"
|
||||||
render action: 'new'
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -48,15 +49,13 @@ class ProposalController < ApplicationController
|
||||||
event_role: 'speaker')
|
event_role: 'speaker')
|
||||||
|
|
||||||
unless @event.save
|
unless @event.save
|
||||||
flash[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
render action: 'new', error: "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||||
render action: 'new'
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
ahoy.track 'Event submission', title: 'New submission'
|
ahoy.track 'Event submission', title: 'New submission'
|
||||||
|
|
||||||
flash[:notice] = 'Proposal was successfully submitted.'
|
redirect_to conference_program_proposal_index_path(@conference.short_title), notice: 'Proposal was successfully submitted.'
|
||||||
redirect_to conference_program_proposal_index_path(@conference.short_title)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
@ -64,8 +63,7 @@ class ProposalController < ApplicationController
|
||||||
@url = conference_program_proposal_path(@conference.short_title, params[:id])
|
@url = conference_program_proposal_path(@conference.short_title, params[:id])
|
||||||
|
|
||||||
if !@event.update(event_params)
|
if !@event.update(event_params)
|
||||||
flash[:error] = "Could not update proposal: #{@event.errors.full_messages.join(', ')}"
|
render action: 'new', error: "Could not update proposal: #{@event.errors.full_messages.join(', ')}"
|
||||||
render action: 'new'
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -101,8 +99,7 @@ class ProposalController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@event.save
|
if !@event.save
|
||||||
flash[:error] = "Could not confirm proposal: #{@event.errors.full_messages.join(', ')}"
|
render action: 'new', error: "Could not confirm proposal: #{@event.errors.full_messages.join(', ')}"
|
||||||
render action: 'new'
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -128,8 +125,7 @@ class ProposalController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@event.save
|
if !@event.save
|
||||||
flash[:error] = "Could not re-submit proposal: #{@event.errors.full_messages.join(', ')}"
|
render action: 'new', error: "Could not re-submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||||
render action: 'new'
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
class RegistrationsController < Devise::RegistrationsController
|
class RegistrationsController < Devise::RegistrationsController
|
||||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
before_action :configure_permitted_parameters, if: :devise_controller?
|
||||||
|
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@openids = Openid.where(user_id: current_user.id).order(:provider)
|
@openids = Openid.where(user_id: current_user.id).order(:provider)
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,24 @@ class SubscriptionsController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
load_and_authorize_resource only: [:create, :destroy], through: :conference
|
load_and_authorize_resource only: [:create, :destroy], through: :conference
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@subscription = current_user.subscriptions.build(conference_id: @conference.id)
|
@subscription = current_user.subscriptions.build(conference_id: @conference.id)
|
||||||
if @subscription.save!
|
if @subscription.save!
|
||||||
flash[:notice] = "You have been subscribed to receive email notifications for #{@conference.short_title}."
|
redirect_to root_path, notice: "You have been subscribed to receive email notifications for #{@conference.short_title}."
|
||||||
redirect_to root_path
|
|
||||||
else
|
else
|
||||||
flash[:error] = subscription.errors.full_messages.to_sentence
|
redirect_to root_path, error: subscription.errors.full_messages.to_sentence
|
||||||
redirect_to root_path
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@subscription = current_user.subscriptions.find_by(conference_id: @conference.id)
|
@subscription = current_user.subscriptions.find_by(conference_id: @conference.id)
|
||||||
if @subscription.destroy
|
if @subscription.destroy
|
||||||
flash[:notice] = "You have been unsubscribed and now you will not be receiving email notifications for #{@conference.short_title}."
|
redirect_to root_path, notice: "You have been unsubscribed and now you will not be receiving email notifications for #{@conference.short_title}."
|
||||||
redirect_to root_path
|
|
||||||
else
|
else
|
||||||
flash[:error] = @subscription.errors.full_messages.to_sentence
|
redirect_to root_path, error: @subscription.errors.full_messages.to_sentence
|
||||||
redirect_to root_path
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ class TicketPurchasesController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
authorize_resource :conference_registrations, class: Registration
|
authorize_resource :conference_registrations, class: Registration
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def create
|
def create
|
||||||
message = TicketPurchase.purchase(@conference, current_user, params[:tickets][0])
|
message = TicketPurchase.purchase(@conference, current_user, params[:tickets][0])
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ class TicketsController < ApplicationController
|
||||||
load_resource :ticket, through: :conference
|
load_resource :ticket, through: :conference
|
||||||
authorize_resource :conference_registrations, class: Registration
|
authorize_resource :conference_registrations, class: Registration
|
||||||
before_filter :check_load_resource, only: :index
|
before_filter :check_load_resource, only: :index
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
def index; end
|
def index; end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
add_flash_types :error
|
||||||
|
add_flash_types :alert
|
||||||
|
|
||||||
# GET /users/1
|
# GET /users/1
|
||||||
def show
|
def show
|
||||||
|
|
@ -15,8 +17,7 @@ class UsersController < ApplicationController
|
||||||
if @user.update(user_params)
|
if @user.update(user_params)
|
||||||
redirect_to @user, notice: 'User was successfully updated.'
|
redirect_to @user, notice: 'User was successfully updated.'
|
||||||
else
|
else
|
||||||
flash[:error] = "An error prohibited your Profile from being saved: #{@user.errors.full_messages.join('. ')}."
|
render :edit, error: "An error prohibited your Profile from being saved: #{@user.errors.full_messages.join('. ')}."
|
||||||
render :edit
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
0
bin/rspec
Executable file → Normal file
0
bin/rspec
Executable file → Normal file
0
bin/spring
Executable file → Normal file
0
bin/spring
Executable file → Normal file
41
db/schema.rb
41
db/schema.rb
|
|
@ -13,8 +13,13 @@
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160201221411) do
|
ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "ahoy_events", force: true do |t|
|
||||||
|
t.uuid "visit_id"
|
||||||
|
=======
|
||||||
create_table "ahoy_events", force: :cascade do |t|
|
create_table "ahoy_events", force: :cascade do |t|
|
||||||
t.uuid "visit_id", limit: 16
|
t.uuid "visit_id", limit: 16
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "properties"
|
t.text "properties"
|
||||||
|
|
@ -31,7 +36,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "campaigns", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "campaigns", force: :cascade do |t|
|
create_table "campaigns", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.integer "conference_id"
|
t.integer "conference_id"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "utm_source"
|
t.string "utm_source"
|
||||||
|
|
@ -43,7 +52,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "cfps", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "cfps", force: :cascade do |t|
|
create_table "cfps", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.date "start_date", null: false
|
t.date "start_date", null: false
|
||||||
t.date "end_date", null: false
|
t.date "end_date", null: false
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
|
@ -51,7 +64,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.integer "program_id"
|
t.integer "program_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "comments", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "comments", force: :cascade do |t|
|
create_table "comments", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.string "title", limit: 50, default: ""
|
t.string "title", limit: 50, default: ""
|
||||||
t.text "body"
|
t.text "body"
|
||||||
t.integer "commentable_id"
|
t.integer "commentable_id"
|
||||||
|
|
@ -146,7 +163,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "difficulty_levels", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "difficulty_levels", force: :cascade do |t|
|
create_table "difficulty_levels", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.string "color"
|
t.string "color"
|
||||||
|
|
@ -188,7 +209,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.text "cfp_dates_updated_body"
|
t.text "cfp_dates_updated_body"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "event_types", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "event_types", force: :cascade do |t|
|
create_table "event_types", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.string "title", null: false
|
t.string "title", null: false
|
||||||
t.integer "length", default: 30
|
t.integer "length", default: 30
|
||||||
t.integer "minimum_abstract_length", default: 0
|
t.integer "minimum_abstract_length", default: 0
|
||||||
|
|
@ -274,7 +299,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "programs", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "programs", force: :cascade do |t|
|
create_table "programs", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.integer "conference_id"
|
t.integer "conference_id"
|
||||||
t.integer "rating", default: 0
|
t.integer "rating", default: 0
|
||||||
t.boolean "schedule_public", default: false
|
t.boolean "schedule_public", default: false
|
||||||
|
|
@ -283,7 +312,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "qanswers", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "qanswers", force: :cascade do |t|
|
create_table "qanswers", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.integer "question_id"
|
t.integer "question_id"
|
||||||
t.integer "answer_id"
|
t.integer "answer_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
|
@ -362,7 +395,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
|
|
||||||
add_index "roles_users", ["user_id", "role_id"], name: "index_roles_users_on_user_id_and_role_id"
|
add_index "roles_users", ["user_id", "role_id"], name: "index_roles_users_on_user_id_and_role_id"
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "rooms", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "rooms", force: :cascade do |t|
|
create_table "rooms", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.string "guid", null: false
|
t.string "guid", null: false
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.integer "size"
|
t.integer "size"
|
||||||
|
|
@ -448,7 +485,11 @@ ActiveRecord::Schema.define(version: 20160201221411) do
|
||||||
t.string "price_currency", default: "USD", null: false
|
t.string "price_currency", default: "USD", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
create_table "tracks", force: true do |t|
|
||||||
|
=======
|
||||||
create_table "tracks", force: :cascade do |t|
|
create_table "tracks", force: :cascade do |t|
|
||||||
|
>>>>>>> upstream/master
|
||||||
t.string "guid", null: false
|
t.string "guid", null: false
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue