def tag_autocomplete
@tags = Tag.find_by_sql("SELECT tag_name as id,tag_name as label,tag_name as value FROM tags ")
render :json => @tags.to_json
end
渲染 json 不工作我收到以下错误
ArgumentError (wrong number of arguments (0 for 2)):
/app/controllers/tags_controller.rb:32:in `to_json'
我正在使用 ruby 1.8.6 和 rails 2.3.5
提前致谢