Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
themorecolor
@themorecolor
Member
NO. 4151 / 2012-10-21

themorecolor@gmail.com
上海
14 Topics / 158 Replies
1 Followers
0 Following
8 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 如何指定子目录里边的 controller 的路由? at April 06, 2014

    class Amount::AmountController < ApplicationController

  • 按照 wiki 上的部署教程操作,安装 Nginx 时出错 at March 07, 2014

    #5 楼 @jyootai 自己建好那个目录 再安装

  • 按照 wiki 上的部署教程操作,安装 Nginx 时出错 at March 06, 2014

    sudo?

  • 在 routes.rb 里添加 match 配置典型路由后,不能使用 rails 命令 at March 04, 2014

    #4 楼 @a307697028 rails4 里面使用 match 的话 必须指定 请求方式 post get。。。

  • 如何做一个图片的服务器呢? at February 22, 2014

    阿里云 有拍云 绑定域名

  • 如何定位到网页文章中的某个位置? at January 27, 2014

    https://github.com/ruby-china/ruby-china/commit/150f1e81831d4815afe64e27109df9eaffc28757

  • 好像 Ruby 的性能问题始终是个大问题啊! at January 13, 2014

  • 有什么最简单的写法吗? at November 17, 2013

    ["a", "b", "c", "d"].fetch(1)

  • 突然 出现 Mac 的终端 和 Term2 一段时间后 假死 必须得 关掉重新打开 at November 05, 2013

    #4 楼 @blueplanet 谢谢 这个是在 电脑内存小的情况下 可能有这个 问题 我的是 10G 内存 在监视器里看了一下 没有内存压缩

    我这个假死 可能是因为 ssh 连接的原因 等 ssh 彻底断掉 就恢复了

  • 突然 出现 Mac 的终端 和 Term2 一段时间后 假死 必须得 关掉重新打开 at November 04, 2013

    #1 楼 @ZombieCoder 我知道原因了 是 使用了 ssh 的原因 一段时间 ssh 不操作 失去连接 时 就会卡一段时间 过一段时间 就好了

  • rails 校验提示问题 at October 31, 2013
    #zh-CN.yml
    # Sample localization file for English. Add more files in this directory for other locales.
    # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
    
    "zh-CN":
      Sign in: 登 陆
      Remeber me: 记住我
      Logout: 退出
      Login: 登陆
      Sign up: 注册
      Password confirmation: 确认密码
      Sign in with: 使用#{provder}账号登陆
      Forgot your password?: 忘记密码?
    
      New website: 添加网址收藏
      submit: 确定
      cancel: 取消
      member: 会员
    
      activerecord:
        models:
          user: 用户
          user_website: 网址
        attributes:
          user:
            username: 用户名
            email: 邮箱
            password: 密码
            password_confirmation: 确认密码
          user_website:
            name: 网址名称
            url: 网址url
            user_category_id: 网址分类
            is_public: 是否公开
        errors:
          models:
            user:
              attributes:
                username:
                  blank: "用户名不能为空!"
    
      devise:
        sessions:
          user:
            signed_in: 登陆成功
            signed_out: 退出成功
    
      helpers:
        submit:
          create: "创建 %{model}"
          update: "Confirm changes to %{model}"
    
       #application.rb
       require File.expand_path('../boot', __FILE__)
    
    require 'rails/all'
    
    if defined?(Bundler)
      # If you precompile assets before deploying to production, use this line
      Bundler.require(*Rails.groups(:assets => %w(development test)))
      # If you want your assets lazily compiled in production, use this line
      # Bundler.require(:default, :assets, Rails.env)
    end
    
    module Okeyso
      class Application < Rails::Application
        # Settings in config/environments/* take precedence over those specified here.
        # Application configuration should go into files in config/initializers
        # -- all .rb files in that directory are automatically loaded.
    
        # Custom directories with classes and modules you want to be autoloadable.
        # config.autoload_paths += %W(#{config.root}/extras)
    
        # Only load the plugins named here, in the order given (default is alphabetical).
        # :all can be used as a placeholder for all plugins not explicitly named.
        # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
    
        # Activate observers that should always be running.
        # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
    
        # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
        # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
        # config.time_zone = 'Central Time (US & Canada)'
    
        # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
        # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
        # config.i18n.default_locale = :de
    
        # Configure the default encoding used in templates for Ruby 1.9.
        config.encoding = "utf-8"
    
        # Configure sensitive parameters which will be filtered from the log file.
        config.filter_parameters += [:password]
    
        # Enable escaping HTML in JSON.
        config.active_support.escape_html_entities_in_json = true
    
        # Use SQL instead of Active Record's schema dumper when creating the database.
        # This is necessary if your schema can't be completely dumped by the schema dumper,
        # like if you have constraints or database-specific column types
        # config.active_record.schema_format = :sql
    
        # Enforce whitelist mode for mass assignment.
        # This will create an empty whitelist of attributes available for mass-assignment for all models
        # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
        # parameters by using an attr_accessible or attr_protected declaration.
        config.active_record.whitelist_attributes = true
    
        # Enable the asset pipeline
        config.assets.enabled = true
    
        # Version of your assets, change this if you want to expire all your assets
        config.assets.version = '1.0'
    
        config.i18n.default_locale = "zh-CN"
      end
    end
    
    
  • rails 校验提示问题 at October 31, 2013

    maybe you need this http://ruby-china.org/topics/12269

  • KindEditor,rails 中如何显示摘要? at October 30, 2013

    strip_tags(content)

  • Rails Guides - <% @posts.each do |post| %> - undefined method `each' for nil:NilClass at October 25, 2013

    #2 楼 @saiga 好眼力

  • Unpermitted parameters: topic_ids at October 25, 2013

    create 之后不需要 save 吧

  • 有深圳或珠三角的朋友来参加 RubyConf 么 at October 24, 2013

    性能 怎么样 和 原生的有多大差别

  • 要不要等新 Mac Mini at October 24, 2013

    想买就买

  • 终于升级 mavericks 了,但是,为什么 google chrome helper 一直未响应 at October 24, 2013

    http://ruby-china.org/topics/14971

  • OS X 更新问题 at October 23, 2013

    我更新了 没有注意这个 忘了 中间有过要去重启一次 是会自动的 忘了之前是否先有次手动的了

  • meta_search 如何转义 % at October 23, 2013

    objective-c 里 是%% - -!

  • 在 rails api 里看到这样的代码 求问 at October 22, 2013

    #1 楼 @skandhas lambda?

  • 有哪些服务或者产品是没办法依赖互联网的 at October 21, 2013

    #7 楼 @suupic 机器不能表达 人类的语气 情绪 等

  • Macaw: The Code-Savvy Web Design Tool (我也能玩转前端设计?) at October 20, 2013

    希望功能跟页面一样 cool

  • 小团队敏捷开发,大家怎么看?求真心话。 at October 20, 2013

    #13 楼 @Victor #15 楼 @liwei78 盘起腿来 是不是 需要把鞋啊 袜子啊 什么的脱掉 在公司的话,容易让人觉得 有点 2 啊 哈哈

  • 小团队敏捷开发,大家怎么看?求真心话。 at October 20, 2013

    #12 楼 @liwei78 盘腿 在椅子上 还是在地上

  • 小团队敏捷开发,大家怎么看?求真心话。 at October 20, 2013

    #5 楼 @Victor 请问 盘腿 盘久了 会疼吗

  • 哪些工作可以少对着电脑,甚至不用对着电脑 at October 20, 2013

    搬砖 可以

  • Go 语言内存分配器设计 at October 20, 2013

    #4 楼 @lgn21st 没有之一

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