Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
fdjlsakf
@rails123
高级会员
第 2540 位会员 / 2012-06-14

2 篇帖子 / 4 条回帖
0 关注者
0 正在关注
0 收藏
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 控制器引用模型时就说方法不存在 at 2012年06月16日

    AController 和 BController 及都没对@current_user作任何改变,又都是从 ApplicationController 导出,但@current_user在 AController 非空,在 BController 就变空了。

  • 控制器引用模型时就说方法不存在 at 2012年06月16日

    在 ApplicationController < ActionController::Base @current_user = User.find_by_id(params[:user_id]) 里已得非空@current_user,且在并且在 AView <%= @current_user.idno %>已正常现示。

  • 控制器引用模型时就说方法不存在 at 2012年06月16日

    在 ApplicationController < ActionController::Base @current_user = User.find_by_id(params[:user_id]) 里已得非空@current_user,且在并且在 AView <%= @current_user.idno %>已正常现示。

  • 用 scaffold 产生的控制器怎么不能继承父类 applicationcontroller 里的变量? at 2012年06月15日

    不用 scaffold 产生的可以继承。

关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English