X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fcontrollers%2Fapplication_controller.rb;h=c6c83a9ce7bb1a190d52dea4d16b0c7a3bbcb074;hp=8fe618b9a44de5f8e4824bbedf6694073e93e520;hb=3f4cd8c9a4ce4336a659d7ad7f7093c0c1cd6ee9;hpb=cd04b33f21158d7885439b1f2ad6ab8783aed98f diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8fe618b9..c6c83a9c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -119,21 +119,26 @@ class ApplicationController < ActionController::Base def filer_list set_list - list_result = @list.open(@operators) - @items = list_result.items + @items = @list.items respond_to do |format| format.html { - @filer = Locmare::Filer.new @list.item_name, list_result.items, list_result, :default, @operators + @filer = Locmare::Filer.new @list.item_name, @items, @list.page_status, @operators render @filer.template_name, :locals => { :filer => @filer } } - format.json { render json: @items.map{|i| i.attributes}.to_json } - # rails3.2 has problem - # y method defined as private - # attribute y conflict at PanelPicture, balloon ..etc - # use i.attributes[name] - # format.json { render json: @items.to_json } + format.json { + res = { + :page_status => @list.page_status.to_hash, + # rails3.2 has problem + # y method defined as private + # attribute y conflict at PanelPicture, balloon ..etc + # use i.attributes[name] + :list => @items.map{|i| i.attributes} + # :list => @items.to_json + } + render json: res.to_json + } format.atom format.rss end