Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
WilliamX
@fantast_xue
会员
第 14125 位会员 / 2014-07-17

杭州
1 篇帖子 / 3 条回帖
0 关注者
0 正在关注
0 收藏
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日

    link_to 确实是可行的。多谢! #5 楼 @Rei

  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日

    #3 楼 @Rei 不好意思,我改回去重新运行了一下,下面是错误信息:

    Template is missing
    Missing template topics/create, application/create with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "/Projects/opinions/app/views"
    

    如果 button_to 放在 form_for 的外面是正常的。

  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日

    #1 楼 @Rei 是说改成这样吗:

    <%= form_for :topic, url: topics_path do |f| %>
    ……
          <%= f.submit value:'Save' %>
          <%= button_to 'Cancel', topics_path, class:'button', method: :get %>
    <% end %>
    

    提示“Template is missing”。

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