rails + ext 实现登陆页面的问题 ()
form提交
simple.form.doAction('submit',{
url:'/permission/login',
method:'post',
params:'',
success:function(f,a){
if (a.result.success==true) {
window.location='main/';
} else {
Ext.Msg.alert('登陆错误',action.result.msg);
}
},
failure:function(){
Ext.Msg.alert('错误','服务器出现错误请稍后再试!');
}
});
PermissionController类
class PermissionController < ApplicationController
def login
render({:content_type => :json, :text => '{success:true}'})
end
end
测试总是提示“服务器出现错误请稍后再试”,
请问那块写的不对?