This commit is contained in:
Gopesh Tulsyan 2014-05-13 10:58:48 +00:00
commit 8b9b9decfd
8 changed files with 32 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class ConferenceController < ApplicationController
def show
@conference = Conference.find_by_title(params[:id])
end
end

View file

@ -0,0 +1,2 @@
module ConferenceHelper
end

View file

@ -0,0 +1,4 @@
.row
.col-md-12
%h1
= @conference.title

View file

@ -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"

View file

@ -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"

2
config/secrets.yml Normal file
View file

@ -0,0 +1,2 @@
development:
secret_key_base: "12345"

View file

@ -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

View file

@ -0,0 +1,5 @@
require 'spec_helper'
describe "conference/show.html.haml" do
pending "add some examples to (or delete) #{__FILE__}"
end