Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
简
@jaynlive
Member
NO. 24587 / 2016-01-15

5 Topics / 11 Replies
0 Followers
3 Following
8 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • ExceptionTrack - 捕捉 Rails 应用运行期的异常,并存储到数据库 at May 15, 2017

    此方法可以解决

    # config/initializers/will_paginate.rb
    if defined?(WillPaginate)
     ActiveSupport.on_load :active_record do
       module WillPaginate
         module ActiveRecord
           module RelationMethods
             def per(value = nil) per_page(value) end
             def total_count() count end
           end
         end
         module CollectionMethods
           alias_method :num_pages, :total_pages
         end
       end
     end
    end
    
  • rails simple_format 保留 html 标签 at February 29, 2016

    找到方法了,在 simple_format 加个 h 就可以了,即 simple_format h(question.title) 效果如下

  • Rails 部署在云主机上,外网怎么访问呢? at January 28, 2016

    #2 楼 @zhulinpinyu rails s -b 52.192.63.155 会报错,显示没有这个 ip

  • Rails 部署在云主机上,外网怎么访问呢? at January 28, 2016

    #1 楼 @kikyous 我使用 passenger 试了一下,跳出这个错,是怎么回事? 配置如下,bundle 是成功的

  • rails link_to 问题 at January 28, 2016

    #7 楼 @embbnux 好的,谢谢大家的解答,又学习了哈

  • rails link_to 问题 at January 24, 2016

    #3 楼 @chenjau 嗯嗯,好的。又理解了一点。

  • rails link_to 问题 at January 24, 2016

    #1 楼 @chenjau 嗯嗯,理解了。那如果是要访问 view/uesrs/下某个视图,一般用什么方法呢?在控制器下 render 么

  • 如何返回不同表单 at January 24, 2016

    #10 楼 @ruby_xiaojie 不是,linux 下的,window 远程连接

  • 如何返回不同表单 at January 22, 2016

    在 new2 中渲染 from2 就可以了。不知道这样行不行

  • 如何返回不同表单 at January 22, 2016

    #3 楼 @w7938940 我像这样子,但上面那个表单不知道如何调用_form2

  • 如何返回不同表单 at January 22, 2016

    #1 楼 @w7938940 那他是怎么知道要调用哪个表单呢?

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