Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Eric-Guo
@ericguo
VIP
NO. 1665 / 2012-03-31

[email protected]
天华建筑设计
上海
46 Topics / 1382 Replies
181 Followers
245 Following
74 Favorites
选Ruby是符合我爱钱爱金爱宝石气质的…
GitHub Public Repos
  • wechat 1331

    API, command and message handling for WeChat in Rails

  • wechat-starter 351

    WeChat web app with wx_pay in rails

  • tailwindcss-jit-stimulus 19

    A template with Rails 7.1, Shakapacker 7.2, TailwindCSS 3 and Stimulus 3.0

  • pgac_demo 13

    Rails 7.2 Action Cable chat room using AnyCable as backend

  • coreui4-rails-starter 12

    The CoreUI 4 Rails starter

  • product_hunt 5

    Demonstrate new Rails 5.1 feature: Assets on Yarn, System tests with Capybara and unified form_wi...

  • openproject 2

    OpenProject is the leading open source project management software.

  • dify-ruby-sdk 2

  • homeland 1

    :circus_tent: An open source forum/community system based on Rails, developed based on Ruby China.

  • ruby 1

    The Ruby Programming Language [mirror]

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 聊聊主流框架,Less/Sass/Compass/Bootstrap/H5bp at July 17, 2012

    能说一下为啥 anjlab-bootstrap-rails不如 bootstrap-sass 么?看递交记录明显 anjlab-bootstrap-rails 更活跃,而且也是 sass 的。

  • cygwin 感觉不错 at July 16, 2012

    Railsinstaller 更好用,Cygwin 太大,安装也太慢。

  • [上海][2012年07月17日] Ruby Tuesday 活动公告 —— 创建你自己的 gem,以 weibo_2 为例 at July 11, 2012

    +1

  • sublime text 2 开发 rails at July 09, 2012

    如何在 Windows 7 下配置 Sublime Text 2 编辑器(需 Git)

  • 快捷迅速的编辑器 at July 02, 2012

    sublime+1

  • 大家用 rails 操作 csv 文件多还是 excel 文件多些? at July 01, 2012

    用 CSV 导出中文真心有技巧啊!整了两个小时,值钱的就一句话,大家猜哪一句吧?

    require 'csv'
    
    class PartRequestsController < ApplicationController
      def render_csv_header(filename = nil)
        filename ||= params[:action]
        filename += '.csv'
        if request.env['HTTP_USER_AGENT'] =~ /msie/i
          headers['Pragma'] = 'public'
          headers["Content-type"] = "text/plain"
          headers['Cache-Control'] = 'no-cache, must-revalidate, post-check=0, pre-check=0'
          headers['Content-Disposition'] = "attachment; filename=\"#{filename}\""
          headers['Expires'] = "0"
        else
          headers["Content-Type"] ||= 'text/csv'
          headers["Content-Disposition"] = "attachment; filename=\"#{filename}\""
        end
      end
    
      def index
        @part_requests = PartRequest.where(:status => params[:status]).order('id DESC')
        @status = params[:status]
    
        respond_to do |format|
          format.html # index.html.erb
          format.json { render json: @part_requests }
          format.csv do
            render_csv_header 'Part_Request_Report'
            csv_res = CSV.generate do |csv|
              csv << PartRequest.new.attributes.keys
              @part_requests.each do |o|
                o.part_request_details.each do |d|
                  csv << o.attributes.values
                end
              end
            end
            send_data "\xEF\xBB\xBF"<<csv_res.force_encoding("ASCII-8BIT")
          end
        end
      end
    end
    

    PS: mark down 处理这段代码也有 bug,今天真是个 bug 日啊!

  • 请教上海办宽带 at June 30, 2012

    有线通其实还好,速度虽然没保证,有限时间通,但是好在价格便宜,1200 十三个月,好像现在还有优惠!

  • Sublime Text 2 扩展工具 at June 30, 2012

    #7 楼 @diudiutang 直接在 Default (Windows).sublime-keymap 里面配置 git 命令更方便。

    { "keys": ["super+ctrl+alt+s"], "command": "git_status" },
    { "keys": ["super+ctrl+alt+a"], "command": "git_add_choice" },
    { "keys": ["super+ctrl+alt+c"], "command": "git_commit" },
    { "keys": ["super+ctrl+alt+d"], "command": "git_checkout" },
    
  • 用 vim 的怎么在模板中方便的输入 <%= %> 等 at June 29, 2012

    用 Sublime Text 2 的话,装一个 ERB Insert and Toggle Commands,然后 Ctrl+Shift+.

  • 如何把 select 选择的值通过 button_to 传输给另外的一个 controller 中的 action? at June 29, 2012

    貌似不可以,button_to 实际上是封装了 form_tag 的 link_to,所以还是 在 form tag 里面老老实实用 hidden field 吧…

  • Sublime Text 2.0 稳定版发布 at June 28, 2012

    http://ruby-china.org/wiki/setting-up-sublime-text-2-in-windows Windows 下安装教程

  • Devise 如何调整 sign_up 的字段? at June 23, 2012

    这个问题已经有官方 HowTo了。

  • 在 win 平台上面有什么好用的命令行工具. at June 21, 2012

    装GIT Extension,已经包括很多 Unix 命令行工具了。

  • 用了 Devise 以后,出现 Routing Error 如何知道错在哪里? at June 21, 2012

    我昨天也突然碰到 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 June 19, 2012

    说说我的做法,直接在 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>
    
  • Sublime Text 2 竟然没有原生支持插入 erb tag 的快捷键 at June 17, 2012

    https://github.com/eddorre/SublimeERB 第三方的有了,名字叫 ERB Insert and Toggle Commands,另外一个 Simple Rails Navigator 的 Rails 插件也不错,推荐。

  • oracle 数据库创建用户指定表空间 at June 16, 2012

    目前没有办法做到这样(当然你可以改代码 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 在 XP 下安装出错,请指教 at June 16, 2012

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

  • 如何将相同项合并为一行,且数值增加 at May 31, 2012

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

  • Rails 3.2 Bootstrap 2.3 startup site via anjlab-bootstrap-rails at May 27, 2012

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

  • 求 bootstrap-sass 替代方案 at May 26, 2012

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

  • Rails 3.2 Bootstrap 2.3 startup site via anjlab-bootstrap-rails at May 26, 2012

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

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

  • [疑问] 从哪里可以看出来某个网站是使用 Rails 开发? at May 24, 2012

    这个吧?相对靠谱。

    <meta content="authenticity_token" name="csrf-param" />
    <meta content="5TTbOz+XQ=" name="csrf-token" />
    
  • Agile Web Development with Rails 4th 3.2 版本的有木有童鞋可以分享下 at May 18, 2012

    PDF and Mobi

  • GeaKit--another social coding project in China at May 17, 2012

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

  • 新版 Rails 3.2.3 中 CSS 文件放哪? at May 13, 2012

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

  • 1000 个小时学会 Rails - 004 神秘的 X 项目 at May 13, 2012

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

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