• 我昨天也突然碰到 Devise 2.1.2 版的这个问题,查了代码,似乎要加 user_signed_in? 到 current_page 之前,最终原因不明……

    <li class="nav-header">SAP Purchase Order</li>
      <li class="<%= 'active' if user_signed_in? and current_page? :controller => 'sap_pos', :action => 'new' %>"><%= link_to "Receive PO Parts", new_sap_po_path %></li>
    

    我的 ApplicationController 中的代码:

    class ApplicationController < ActionController::Base
      protect_from_forgery
      before_filter :authenticate_user!
    end
    
  • Asset pipeline 在 IE 下的问题 at 2012年06月19日

    说说我的做法,直接在 application layout 上加 css fix,用的是 Bootstrap,修正Bootstrap 使用响应式设计 (Responsive Design) 时导航条上部有空白的解决方案里的方案一中漏过的 IE 的 Bug。

    <head>
      <title>SPMS</title>
      <%= stylesheet_link_tag "application", :media => "all" %>
      <%= csrf_meta_tags %>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
          <style type="text/css">
          body {padding-top: 60px;}
          </style>
        <![endif]-->
    </head>
    
  • https://github.com/eddorre/SublimeERB 第三方的有了,名字叫 ERB Insert and Toggle Commands,另外一个 Simple Rails Navigator 的 Rails 插件也不错,推荐。

  • 目前没有办法做到这样(当然你可以改代码 C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\activerecord-oracle_enhanced-adapter-1.4.1\lib\active_record\connection_adapters\oracle_enhanced.rake 文件,行 ActiveRecord::Base.connection.execute "CREATE USER #{config['username']} IDENTIFIED BY #{config['password']}"),更简单的方法是,用 Oracle 的 sqlplus,新建 user:

    create user railsapp identified by app_password default tablespace railsapp_tb;
    grant resource to railsapp;
    

    然后直接用 rake db:migrate。

  • Rails Installer 由于墙的关系不能下载,可以从用 115 的网盘下。

  • 把问题代码 push 到 github 看看吧?你这样凭空问,估计不会有啥应答的…

  • #3 楼 @hhuai 大概看了一下Template,功能很强大,但是相当抽象 (program generate program),感觉新建站点还是从已有的一个代码基础上开始简单一点。。。

  • 求 bootstrap-sass 替代方案 at 2012年05月26日

    less-rails-bootstrap 无法在 Windows 下运行,bootstrap-sass-rails 没有试,我用的是 anjlab-bootstrap-rails,如果是新建站点,可以从这个帖子上的 Startup Site 开始

  • #1 楼 @willmouse 发布的匆忙了点,不过 README 写了,只不过在 Rails 说明之前,Gem, root_path, index.html 都删了,sublime 只加了 project,如果您仔细看一下,里面也有一些不错的配置。

    任何人都有习惯的东西,如果不习惯,fork it :-)

  • 这个吧?相对靠谱。

    <meta content="authenticity_token" name="csrf-param" />
    <meta content="5TTbOz+XQ=" name="csrf-token" />
    
  • PDF and Mobi

  • 反正 GIT 也支持分布开发,多站点 push,多一个 git hosting 站点总是好的,不是么?

  • Ruby on Rails Guides,值得反复研读。

  • “经过无数的会议及考量后,领导决定使用与铁道部其名相称的技术 Rails”我彻底晕掉……,太欢乐了,哈哈哈!

  • 3.1 开始移到 app\assets\stylesheets 了

  • rvm install 1.9.2-p318 --patch railsexpress 貌似 railsexpress 上已经包括了,第一个补丁 01-railsbench-gc-patch 就是了吧?

  • 后来这个项目取消了,我跟@kenshin54混了,做了一个脚本速度评估网

  • 参与第一吧,@lgn21st @ripple @jjxp2007 带我玩不?我连 idea 都有了,这也是我的第一个 rails 项目,这个是介绍,有兴趣么?其实我们也可以提前开始,嘿嘿

    SPXP - Spare Part eXchange Project

    Purpose

    We want to exchange our copyright & valuable spare part (Software, Music CD, Books, Game CD) while at the same time respect the copyright owership. If we can find otherone spare part just we need, it's ever more great.

    我们都有一些闲置物品,比如一些已经不用的软件,不太听的 CD,不太翻动的图书,不再玩的游戏等等,我希望能有一个地方处理这些物品,如果在这个地方能找到我需要的物品,那么就更好了。

    Key Point

    • 实名制(Link with SNS account)
    • 实体交换(We want to respect law and ownership)
    • 只做本地(Exchange at Shanghai Subway Stations only)
    • 注册先贡献(Must key in spare part to attend)
    • 贡献即积分(You can get every spare part here if you ower another half)

    Tools and Framework

    Ruby & Rails, Bootstrap, MySQL

    Source Code

    https://github.com/Eric-Guo/spx

  • DAS Keyboard Silent 和 Rosewill 9000 Brown 都在用,感觉还是 DAS Keyboard 手感好。

  • 为啥不加上私信功能? at 2012年04月10日

    请不要加这个功能,实际上 gitHub.com 刚刚拿掉这个功能,如果想私信,请发邮件,如果找不到邮件,那就说明人家不想被打扰……

  • Q1,请习惯,改了你的键位实际上你会不适应很多其他机器的键位,以后你会更纠结的,当然为了防止你认为我在忽悠你,将""和"-",以及":"和";"对换方法是改 Key Bindings - User,然后加入这四行(强烈不推荐): { "keys": ["-"], "command": "insert", "args": {"characters": ""} }, { "keys": [";"], "command": "insert", "args": {"characters": ":"} }, { "keys": ["shift+_"], "command": "insert", "args": {"characters": "-"} }, { "keys": ["shift+;"], "command": "insert", "args": {"characters": ";"} }, Q2,这个可以有…… { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} }, 同样地方修改,当然最佳方法还是不改,使用 ctrl+enter 达到你的目的。