Rendering json has encoded characters

11 views
Skip to first unread message

M.SH

unread,
Jun 17, 2012, 5:27:06 PM6/17/12
to rubyonra...@googlegroups.com
hello all
i'm using rails3.0.10

    def districts
        @names = Node.where("name like ?", "%#{params[:term]}%").limit(5).map(&:name)
        respond_to do |format|
          format.json {render :json => @names}
          format.xml {render :xml => @names}
        end
      end

render xml get right names
but render json make the names is encoded

any help?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages