app/controllers/welcome_controller.rb
class WelcomeController < ApplicationController
respond_to :html, :json
def index
@events = Event.upcoming_events
respond_with @events
end
def about
end
def faq
end
def featured
@events = Event.featured_events
renders(@events)
end
def popular
@events = Event.popular_events
renders(@events)
end
def about
@milestone_presenter = Welcome::WelcomePresenter.new
end
def renders(events)
respond_with(events) do |format|
format.html { render "welcome/events_list", layout: false }
format.json { render json: events }
end
end
end