`
52jobs
  • 浏览: 11765 次
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
增强 textmate 功能--- Validate and Save your Ruby in TextMate   http://drnicwilliams.com/2010/06/01/validate-and-save-your-ruby-in-textmate-with-secret-rubinus-superpowers/ 使用 app scrolls生成 rails 项目 Instant new Rails applications with the App Scrolls   http://drnicwilliams.com/?s=ruby gem install appscr ...

rails 调试

#24 The Stack Trace A plugin called Rails Footnotes will turn the lines from the stack trace into clickable links that will open the appropriate file in TextMate. To install it, run the following line from your app’s directory (you’ll need to have git installed on your machine). terminal git clone ...

rails 小技巧

#Rails Tip 1 Actions Are Methods http://errtheblog.com/posts/1-actions-are-methods class PostsController < ApplicationController def list_by_author list :conditions => ['author_id = ?', params[:id]] end def list(find_options = {}) @posts = Post.find(:all, { :order => ' ...

ruby 小技巧

#Track 1: The C in MVC #irb Mix Tape http://errtheblog.com/posts/24-irb-mix-tape #深入讲解 app http://pragmaticstudio.com/blog/2006/4/4/running-your-rails-app-headless $ ruby script/console #Loading development environment. >> app.url_for(:controller => 'stories', :action => 'show', :i ...
Rails Create an image with link using the image helper <%= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org' %>01.gemfile #long_block_rhs.rb def self.logger @logger ||= begin (defined?(Rails) && Rails.logger) || (defined?(RAILS ...

rails bash

1、一个完整的rails app自动生成bash 引用#!/bin/bash clear echo -e "Preparing to start ...\n" cd /Users/gelias/workspace/ruby echo -e "removing oldest version ... \n" rm -rf /Users/gelias/workspace/ruby/cardapiaria echo -e "using ruby version 1.9.3 and Rails 3.2" rvm 1.9.3@rails3 ...
1、rails 基本 rails new rails-bootstrap -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb rails new User_Auth -d mysql rails new $1 -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb rails g model comment content:text commentable_id:integer commentable_ty ...
  升级到 Rails 4,你的应用需要准备什么?   升级到 Rails 4 http://www.oschina.net/translate/get-your-app-ready-for-rails-4?print
#33 Making a Plugin 引用注意 这种手法,可能对 rails 4 不再起作用 rails4 http://guides.rubyonrails.org/plugins.html 关于废弃插件的说明 https://github.com/rails/rails/commit/dad7fdc5734a3813246f238ac5760b2076932216 rails 3及以下 After loading the framework and any gems and plugins in your application, Rails turns to loading initi ...
#31 Formatting Time 方法一: Task.first.due_at.to_s =>2009-02-19 00:00:00 UTC Task.first.due_at.to_s =>(:long) February 19, 2009 00:00 Task.first.due_at.to_s(:short) =>19 Feb 00:00 Task.first.due_at.to_s(:long) Task.first.due_at.to_s(:db) =>2009-02-19 00:00:00 ...
引用 # 19Where Administration Goes#20 Restricting Access#21 Super Simple Authentication  以上三篇构一组 Authentication # 19Where Administration Goes script/generate scaffold episode "admin/episodes" #Implementing The Admin Links <li> <p class="episodeId">< ...

ActiveRecord

ActiveRecord 4新特性 http://www.oschina.net/translate/get-your-app-ready-for-rails-4?print ActiveRecord 范围需要一个 Callable 对象。 在 Rails 4 中,所有 ActiveRecord 范围必须使用一个 callable 对象来定义: #Rails 3.2 scope :recent, where(created_at: Time.now - 2.weeks) #Rails 4 scope :recent, -> { where("created_at ...

工作相关

# 工作经历: 2年制造业ERP开发及管理经验 2年旅游信息化整体方案 5年欧美软件外包开发及管理经验 兴趣爱好:本人专注于软件项目,目前为Agile所倾倒,喜欢SCRUM、XP、团队建设,同时对.Net、Ruby on Rails、开源软件、软件质量保证有极大的兴趣. 如果你不想加班, 如果你爱学习技术,钻研技术,如果你想和很多优秀的同事一起工作,那就请赶紧 联系我wangdeshui@gmail.com mac终端命令大全介绍 http://www.douban.com/note/75797151/
#使用TextMate进行Ruby On Rails开发推荐插件 ruby-on-rails-tmbundle https://github.com/drnic/ruby-on-rails-tmbundle/tree/master mkdir -p ~/Library/Application\ Support/TextMate/Bundles cd ~/Library/Application\ Support/TextMate/Bundles git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on R ...
#208 erb-blocks 简介:在erb中使用blocks,可以为 html,封装逻辑 module ApplicationHelper def admin_area(&block) content_tag(:div, :class => "admin", &block) if admin? end def admin? true end end #234 simple_form <%= simple_form_for @product do |f| %> <% ...
Global site tag (gtag.js) - Google Analytics