2013-07-05 17:08:09 +01:00
|
|
|
class Platforms::ContentsController < Platforms::BaseController
|
|
|
|
include PaginateHelper
|
|
|
|
|
|
|
|
before_filter :authenticate_user!
|
|
|
|
skip_before_filter :authenticate_user! if APP_CONFIG['anonymous_access']
|
|
|
|
|
|
|
|
load_and_authorize_resource :platform
|
|
|
|
|
|
|
|
def index
|
2013-07-08 11:39:44 +01:00
|
|
|
@path = params[:path].to_s
|
2013-07-05 17:08:09 +01:00
|
|
|
@term = params[:term]
|
|
|
|
@contents = PlatformContent.find_by_platform(@platform, @path, @term)
|
|
|
|
.paginate(paginate_params)
|
2013-07-08 11:39:44 +01:00
|
|
|
|
2013-07-05 17:08:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|