diff --git a/app/controllers/conference_controller.rb b/app/controllers/conference_controller.rb new file mode 100644 index 00000000..fd1fe19c --- /dev/null +++ b/app/controllers/conference_controller.rb @@ -0,0 +1,5 @@ +class ConferenceController < ApplicationController + def show + @conference = Conference.find_by_title(params[:id]) + end +end diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb new file mode 100644 index 00000000..26a58bdd --- /dev/null +++ b/app/helpers/conference_helper.rb @@ -0,0 +1,2 @@ +module ConferenceHelper +end diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml new file mode 100644 index 00000000..e25729d1 --- /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/home/index.html.haml b/app/views/home/index.html.haml index 73702c5f..59755fd6 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -24,6 +24,7 @@ = simple_format(conference.venue.description, class: 'lead') .col-md-2 .btn-group-vertical + = link_to "View Conference", conference_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 1fdcc96f..da2b073f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,4 @@ Osem::Application.routes.draw do - devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts' namespace :admin do @@ -51,7 +50,7 @@ Osem::Application.routes.draw do end end - resources :conference, :only => [] do + resources :conference, :only => [:show] do resources :proposal do resources :event_attachment, :controller => "event_attachments" patch "/confirm" => "proposal#confirm" diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 00000000..880f53c4 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,2 @@ +development: + secret_key_base: "12345" \ No newline at end of file diff --git a/spec/controllers/conference_controller_spec.rb b/spec/controllers/conference_controller_spec.rb new file mode 100644 index 00000000..fd6b8077 --- /dev/null +++ b/spec/controllers/conference_controller_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe ConferenceController do + + describe 'GET #show' do + it 'returns http success' do + get :show, :id => 'sample' + expect(response).to be_success + end + end + +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