diff --git a/app/assets/javascripts/conferences.js b/app/assets/javascripts/conferences.js deleted file mode 100644 index dee720fa..00000000 --- a/app/assets/javascripts/conferences.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/conferences.css.scss b/app/assets/stylesheets/conferences.css.scss deleted file mode 100644 index 0454fea7..00000000 --- a/app/assets/stylesheets/conferences.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the conferences controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/conference_controller.rb b/app/controllers/conference_controller.rb new file mode 100644 index 00000000..85f72ea0 --- /dev/null +++ b/app/controllers/conference_controller.rb @@ -0,0 +1,5 @@ +class ConferenceController < ApplicationController + def show + @conference = Conference.find_by_title(params[:conference_id]) + end +end diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb deleted file mode 100644 index 88a39551..00000000 --- a/app/controllers/conferences_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ConferencesController < ApplicationController - def show - @conference = Conference.find_by_title(params[:format]) - end -end diff --git a/app/helpers/conferences_helper.rb b/app/helpers/conferences_helper.rb deleted file mode 100644 index edfcfdd1..00000000 --- a/app/helpers/conferences_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ConferencesHelper -end diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml new file mode 100644 index 00000000..56e2509f --- /dev/null +++ b/app/views/conference/show.html.haml @@ -0,0 +1,4 @@ +.row + .col-md-12 + %h1 + = @conference.title \ No newline at end of file diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml deleted file mode 100644 index 9ec58232..00000000 --- a/app/views/conferences/show.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -.row - .col-md-12 - %h1 - = @conference.title - - - - - - - diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 13eb233f..b4478c89 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -24,7 +24,7 @@ = simple_format(conference.venue.description, class: 'lead') .col-md-2 .btn-group-vertical - = link_to "View Conference", conferences_show_path(conference.title), :class => " btn btn-default" + = link_to "View Conference", conference_show_path(conference.title), :class => " btn btn-default" - if conference.registration_open? - if conference.user_registered?(current_user) = link_to "Modify Registration", register_conference_path(conference.short_title), :class =>"btn btn-default" diff --git a/config/routes.rb b/config/routes.rb index b5c75471..3bc6e021 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,5 @@ Osem::Application.routes.draw do - - get 'conferences/show' + devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts' @@ -50,6 +49,7 @@ Osem::Application.routes.draw do end resources :conference, :only => [] do + get '/show' => 'conference#show' resources :proposal do resources :event_attachment, :controller => "event_attachments" put "/confirm" => "proposal#confirm" diff --git a/spec/controllers/conferences_controller_spec.rb b/spec/controllers/conference_controller_spec.rb similarity index 82% rename from spec/controllers/conferences_controller_spec.rb rename to spec/controllers/conference_controller_spec.rb index 01a3efc0..33874774 100644 --- a/spec/controllers/conferences_controller_spec.rb +++ b/spec/controllers/conference_controller_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe ConferencesController do +describe ConferenceController do describe "GET 'show'" do it "returns http success" do diff --git a/spec/helpers/conferences_helper_spec.rb b/spec/helpers/conference_helper_spec.rb similarity index 76% rename from spec/helpers/conferences_helper_spec.rb rename to spec/helpers/conference_helper_spec.rb index 5192097f..fe33f1b6 100644 --- a/spec/helpers/conferences_helper_spec.rb +++ b/spec/helpers/conference_helper_spec.rb @@ -1,15 +1,15 @@ require 'spec_helper' # Specs in this file have access to a helper object that includes -# the ConferencesHelper. For example: +# the ConferenceHelper. For example: # -# describe ConferencesHelper do +# describe ConferenceHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this","that")).to eq("this that") # end # end # end -describe ConferencesHelper do +describe ConferenceHelper do pending "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/views/conference/show.html.haml_spec.rb b/spec/views/conference/show.html.haml_spec.rb new file mode 100644 index 00000000..900c39b7 --- /dev/null +++ b/spec/views/conference/show.html.haml_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe "conference/show.html.haml" do + pending "add some examples to (or delete) #{__FILE__}" +end