2012-05-04 23:55:58 -04:00
|
|
|
class BlogsController < ApplicationController
|
|
|
|
def index
|
|
|
|
@blogs = Blog.released
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.json { render :json => @blogs }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
@blog = Blog.get(params[:id])
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.json { render :json => @blog }
|
2012-05-05 00:08:02 -04:00
|
|
|
end
|
2012-05-04 23:55:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|