2012-07-29 00:33:03 +02:00
|
|
|
class HomeController < ApplicationController
|
|
|
|
skip_before_filter :authenticate_user!, :only => [:index]
|
|
|
|
|
2012-07-29 18:37:56 +02:00
|
|
|
add_breadcrumb I18n.t(:home_page), :root_path
|
2012-07-29 00:33:03 +02:00
|
|
|
|
|
|
|
def index
|
|
|
|
@collections = Collection.popular.limit(12)
|
|
|
|
@popular_photos = Photo.popular.limit(10)
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.json { render :json => @collections }
|
|
|
|
format.xml { render :xml => @collections }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|