rails + ext 实现登陆页面的问题

yuqi508 2008-04-22 01:55:31
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


测试总是提示“服务器出现错误请稍后再试”,
请问那块写的不对?





...全文
139 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

2,764

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ruby/Rails
社区管理员
  • Ruby/Rails社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧