1 2 3 4 5 ··· 10 下一页
摘要: ####添加 Gem````gem 'exception_notification'````#### 配置在 production.rb 里面配置邮件和添加 exception_notificaiton 配置```` # 配置邮件 config.action_mailer.delivery_me... 阅读全文
posted @ 2015-08-29 12:19 LaoQuans 阅读(280) 评论(0) 推荐(0) 编辑
摘要: ``` . A B C ``` 阅读全文
posted @ 2015-07-11 18:29 LaoQuans 阅读(239) 评论(0) 推荐(0) 编辑
摘要: ``` var str = "" document.addEventListener("keydown", function(e){ console.log(e.keyCode) var ENTER = 13 if(e.keyCode == ENTER){ console.log(str) str = "" return; }... 阅读全文
posted @ 2015-07-11 18:27 LaoQuans 阅读(183) 评论(0) 推荐(0) 编辑
摘要: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html 阅读全文
posted @ 2014-12-16 10:18 LaoQuans 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://zetcode.com/db/mysqlrubytutorial/很不错的文章 阅读全文
posted @ 2014-10-21 20:50 LaoQuans 阅读(136) 评论(0) 推荐(0) 编辑
摘要: ### callbacks before_save :assign_qr_code ### mount uploader mount_uploader :qr_code_image, QrCodeUploader # 上面这两行代码换位置就不行了,为啥? private def as... 阅读全文
posted @ 2014-10-14 13:16 LaoQuans 阅读(311) 评论(0) 推荐(0) 编辑
摘要: new_user_session GET /users/sign_in {:controller=>"devise/sessions", :action=>"new"} user_session POST /users/sign... 阅读全文
posted @ 2014-09-29 12:08 LaoQuans 阅读(190) 评论(0) 推荐(0) 编辑
摘要: TableDefinition 的对象,就是我们在写 migrate 的时候使用的对象 t如下class SomeMigration "ActiveRecord::ConnectionAdapters::TableDefinition" end end def down ... ... 阅读全文
posted @ 2014-09-21 17:59 LaoQuans 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 跟 column相关的常见的方法有:column_exists? (table_name, column_name, type = nil, options = {})add_column (table_name, column_name, type, options = {})remove_co... 阅读全文
posted @ 2014-09-21 17:04 LaoQuans 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 常见的方法有 : create_table, drop_table, rename_table, change_table, table_exist?详细如下:最常见的创建表格: create_table(table_name, options={})table_name 参数可以是字符串或者是符号... 阅读全文
posted @ 2014-09-21 15:39 LaoQuans 阅读(285) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 10 下一页