![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
rails
iteye_9459
这个作者很懒,什么都没留下…
展开
-
rails view session layout
[color=blue]#208 erb-blocks[/color][code="ruby"]简介:在erb中使用blocks,可以为 html,封装逻辑module ApplicationHelper def admin_area(&block) content_tag(:div, :class => "admin", &block) if admin? en...原创 2014-02-21 19:00:02 · 91 阅读 · 0 评论 -
rails 小技巧
[color=blue]#Rails Tip 1 Actions Are Methods http://errtheblog.com/posts/1-actions-are-methods[/color][code="ruby"]class PostsController < ApplicationController def list_by_author list :cond...原创 2014-02-23 22:55:52 · 124 阅读 · 0 评论 -
ruby 小技巧
[code="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/cons...原创 2014-02-23 21:18:30 · 140 阅读 · 0 评论 -
rails 小代码合集 view controller model
[code="ruby"]Rails Create an image with link using the image helper 01.gemfile[/code][code="ruby"]#long_block_rhs.rb def self.logger @logger ||= begin (defined?(Rails) && Rails.logger...原创 2014-02-23 13:18:38 · 282 阅读 · 0 评论 -
rails bash
[color=blue]1、一个完整的rails app自动生成bash[/color][quote]#!/bin/bashclearecho -e "Preparing to start ...\n"cd /Users/gelias/workspace/ruby echo -e "removing oldest version ... \n"rm -rf /Use...原创 2014-02-22 21:48:35 · 133 阅读 · 0 评论 -
实用工具--rails 命令、generator
[code="java"]1、rails 基本rails new rails-bootstrap -m https://raw.github.com/RailsApps/rails-composer/master/composer.rbrails new User_Auth -d mysqlrails new $1 -m https://raw.github.com/Rails...原创 2014-02-22 20:52:13 · 144 阅读 · 0 评论 -
rails 版本 更新/升级 release note
升级到 Rails 4,你的应用需要准备什么? 升级到 Rails 4 http://www.oschina.net/translate/get-your-app-ready-for-rails-4?print原创 2014-02-22 14:02:52 · 120 阅读 · 0 评论 -
理解rails gems plugins
[color=blue]#33 Making a Plugin[/color][quote]注意 这种手法,可能对 rails 4 不再起作用rails4 http://guides.rubyonrails.org/plugins.html关于废弃插件的说明 https://github.com/rails/rails/commit/dad7fdc5734a3813246f238a...原创 2014-02-22 13:06:38 · 161 阅读 · 0 评论 -
日期 、路由辅助方法
[color=blue]#31 Formatting Time[/color][code="ruby"]方法一:Task.first.due_at.to_s =>2009-02-19 00:00:00 UTCTask.first.due_at.to_s =>(:long) February 19, 2009 00:00Task.first....原创 2014-02-22 11:48:16 · 86 阅读 · 0 评论 -
Authentication 用户登录 用户权限相关
[quote]# 19Where Administration Goes#20 Restricting Access#21 Super Simple Authentication 以上三篇构一组 Authentication[/quote][color=blue]# 19Where Administration Goes[/color][code="ruby"]script/ge...原创 2014-02-21 21:20:10 · 695 阅读 · 0 评论 -
ActiveRecord
[color=blue]ActiveRecord 4新特性 [url]http://www.oschina.net/translate/get-your-app-ready-for-rails-4?print[/url][/color][code="ruby"]ActiveRecord 范围需要一个 Callable 对象。在 Rails 4 中,所有 ActiveRecord 范...原创 2014-02-21 20:39:42 · 181 阅读 · 0 评论 -
工作相关
# 工作经历:2年制造业ERP开发及管理经验2年旅游信息化整体方案5年欧美软件外包开发及管理经验兴趣爱好:本人专注于软件项目,目前为Agile所倾倒,喜欢SCRUM、XP、团队建设,同时对.Net、Ruby on Rails、开源软件、软件质量保证有极大的兴趣. 如果你不想加班, 如果你爱学习技术,钻研技术,如果你想和很多优秀的同事一起工作,那就请赶紧 联系我wangdes...原创 2014-02-21 20:27:55 · 85 阅读 · 0 评论 -
rails 开发工具相关
#使用TextMate进行Ruby On Rails开发推荐插件ruby-on-rails-tmbundlehttps://github.com/drnic/ruby-on-rails-tmbundle/tree/mastermkdir -p ~/Library/Application\ Support/TextMate/Bundlescd ~/Library/Applic...原创 2014-02-21 20:14:22 · 120 阅读 · 0 评论 -
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 li...原创 2014-02-23 22:57:17 · 99 阅读 · 0 评论