摘要:
####添加 Gem````gem 'exception_notification'````#### 配置在 production.rb 里面配置邮件和添加 exception_notificaiton 配置```` # 配置邮件 config.action_mailer.delivery_me... 阅读全文
摘要:
``` . A B C ``` 阅读全文
摘要:
```
var str = "" document.addEventListener("keydown", function(e){ console.log(e.keyCode) var ENTER = 13 if(e.keyCode == ENTER){ console.log(str) str = "" return; }... 阅读全文
摘要:
http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html 阅读全文
摘要:
http://zetcode.com/db/mysqlrubytutorial/很不错的文章 阅读全文
摘要:
### callbacks before_save :assign_qr_code ### mount uploader mount_uploader :qr_code_image, QrCodeUploader # 上面这两行代码换位置就不行了,为啥? private def as... 阅读全文
摘要:
new_user_session GET /users/sign_in {:controller=>"devise/sessions", :action=>"new"} user_session POST /users/sign... 阅读全文
摘要:
TableDefinition 的对象,就是我们在写 migrate 的时候使用的对象 t如下class SomeMigration "ActiveRecord::ConnectionAdapters::TableDefinition" end end def down ... ... 阅读全文
摘要:
跟 column相关的常见的方法有:column_exists? (table_name, column_name, type = nil, options = {})add_column (table_name, column_name, type, options = {})remove_co... 阅读全文
摘要:
常见的方法有 : create_table, drop_table, rename_table, change_table, table_exist?详细如下:最常见的创建表格: create_table(table_name, options={})table_name 参数可以是字符串或者是符号... 阅读全文