• @zzhattzzh

    
    Gupiao::Application.configure do
      # Settings specified here will take precedence over those in config/application.rb
    
      # Code is not reloaded between requests
      config.cache_classes = true
    
      # Full error reports are disabled and caching is turned on
      config.consider_all_requests_local       = false
      config.action_controller.perform_caching = true
    
      # Disable Rails's static asset server (Apache or nginx will already do this)
      config.serve_static_assets = true
    
      # Compress JavaScripts and CSS
      config.assets.compress = false
    
      # Don't fallback to assets pipeline if a precompiled asset is missed
      config.assets.compile = true
    
      # Generate digests for assets URLs
      config.assets.digest = true
    
      config.assets.js_compressor = :closure
      #config.assets.css_compressor = :scss
    
      # Defaults to Rails.root.join("public/assets")
      # config.assets.manifest = YOUR_PATH
    
      # Specifies the header that your server uses for sending files
      # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
      # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
    
      # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
      # config.force_ssl = true
    
      # See everything in the log (default is :info)
      # config.log_level = :debug
    
      # Prepend all log lines with the following tags
      # config.log_tags = [ :subdomain, :uuid ]
    
      # Use a different logger for distributed setups
      # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
    
      # Use a different cache store in production
      # config.cache_store = :mem_cache_store
    
      # Enable serving of images, stylesheets, and JavaScripts from an asset server
      # config.action_controller.asset_host = "http://assets.example.com"
    
      # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
      # config.assets.precompile += %w( search.js )
    
      # Disable delivery errors, bad email addresses will be ignored
      # config.action_mailer.raise_delivery_errors = false
    
      # Enable threaded mode
      # config.threadsafe!
    
      # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
      # the I18n.default_locale when a translation can not be found)
      config.i18n.fallbacks = true
      config.i18n.default_locale = "zh-CN"
    
      # Send deprecation notices to registered listeners
      config.active_support.deprecation = :notify
    
      # Log the query plan for queries taking more than this (works
      # with SQLite, MySQL, and PostgreSQL)
      # config.active_record.auto_explain_threshold_in_seconds = 0.5
    end
    
    
  • 关于渲染 create.js.erb 文件 at 2012年10月26日

    @qlorySpring 可以

  • @taojay315 是的

  • @suupic 解决:你想从哪个 model 获取数据,你就在那个 model 定义一个 def,把另外一个 model 的 id 作为参数传入,搜索

  • @metal 保存数据明白,但是保存后,在某一个场景要把中间表的数据输出,应该要怎么做才好,如果按照平常,直接就用两个 MODEL 的 ID 搜索中间表!

  • 非 ID 数据···例如一篇文章可以由多位作者一起写,一个作者可以参与多篇文章,所以用中间表存储作者的 id 和文章的 id 作为关联,现在中间表还要存储多一项数据,就是修改的时间,现在问题就是如何获取这个时间

  • !!!!

  • @help5305fff @winnie 谢啦!

  • @ywencn 那如果连接 POST,上一页面的表单数据,需要怎样特殊的处理么?

  • @kevinhua 这个界面风格,有开源吗?

  • redis-search 的使用例子 App at 2012年08月02日

    @huacnlee 我这里搜索出两项,一项其中一个字段是没数据得,我检查过数据库,没有重复数据,而那个空的字段,数据库里也有数据,我在 controller 里加了是否为空的判断,暂时解决!可能是我哪里写错了!回头认真检查下! 弱弱问问,redis 数据库,怎样在 vps 中部署启动,用 cap 吗?

  • redis-search 的使用例子 App at 2012年08月01日

    @huacnlee 按照 example,有 2 个问题 1 搜索的数据结果每项重复一次 2 过滤部分,对某些会自动添加\'';\n

    修改不了,发现不了哪里出问题

  • redis-search 的使用例子 App at 2012年08月01日

    @huacnlee 谢了!

  • redis-search 支持 MySQL 吗? at 2012年08月01日

    @ywencn 哦,我意思不是全部,是一部分! @huacnlee 是的,前段!新手,理解能力较差,多点例子,容易学习

  • redis-search 支持 MySQL 吗? at 2012年08月01日

    @huacnlee view 方面应该要怎么写?是否能把 780p.io 这部分开源下呢,也可以作为学习这个 GEM 的实例!

  • 有制定版本安装的 gem install rails -v xxxx