From 677507d62f93e30e5fb9c0e58e9b085acf647086 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Sun, 12 Apr 2015 23:48:52 +0800 Subject: [PATCH] type_en archives page fix --- app/controllers/archives_controller.rb | 4 ++-- app/views/archives/index.html.slim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 11b0e7f..7d31986 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -28,7 +28,7 @@ class ArchivesController < ApplicationController respond_to do |format| format.json do - render :json => { + render :json => { posts: @posts.collect { |post| build_summary(post) }, start_with: start_with } @@ -49,7 +49,7 @@ class ArchivesController < ApplicationController def build_summary(post) { title: post.title, - type: post.type, + type: post.type_en, created_at: format_date(post.created_at), id: post.id.to_s, liked_count: post.liked_count, diff --git a/app/views/archives/index.html.slim b/app/views/archives/index.html.slim index 01181a9..e929fc8 100644 --- a/app/views/archives/index.html.slim +++ b/app/views/archives/index.html.slim @@ -12,7 +12,7 @@ |{{ post.created_at }} i.fi-list-thumbnails span - |{{ post.type_en }} + |{{ post.type }} i.fi-pricetag-multiple span |{{ post.labels }}