Permalink
Browse files

Make root work without a redirect

  • Loading branch information...
1 parent a7cec05 commit 6c448edc18e5332f2ccebeeff1c0f0d9e0e982eb @valopacific valopacific committed Dec 22, 2011
Showing with 29 additions and 1 deletion.
  1. +4 −1 app/controllers/events_controller.rb
  2. +25 −0 app/views/events/current.html.erb
@@ -23,7 +23,10 @@ def show
def current
@event = Event.last
- redirect_to event_path(@event)
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @event }
+ end
end
end
@@ -0,0 +1,25 @@
+<p id="notice"><%= notice %></p>
+
+<%= render 'top' %>
+
+<p>
+<%= link_to 'Register for this event', register_event_path(@event) %>
+</p>
+<p>
+<%= link_to 'Call for speaker proposals', call_for_proposals_event_path(@event) %>
+</p>
+<p>
+<%= link_to 'Want to be a sponsor for this event?', call_for_sponsors_event_path(@event) %>
+</p>
+
+<p>
+ <b>Name:</b>
+ <%= @event.name %>
+</p>
+
+<p>
+ <b>Description:</b>
+ <%= @event.description %>
+</p>
+
+<%= link_to 'Back', events_path %>

0 comments on commit 6c448ed

Please sign in to comment.