added legacy api for posts
This commit is contained in:
11
app/controllers/legacy_controller.rb
Normal file
11
app/controllers/legacy_controller.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class LegacyController < ApplicationController
|
||||
def posts
|
||||
@post_set = PostSets::Post.new(tag_query, params[:page])
|
||||
@posts = @post_set.posts
|
||||
end
|
||||
|
||||
private
|
||||
def tag_query
|
||||
params[:tags] || (params[:post] && params[:post][:tags])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user