Quantcast
Channel: Frank Sun » acmicus@yahoo.com
Browsing all 5 articles
Browse latest View live

Rails Transactions

Question: I have an example Action in a Controller. def some_action product =Product.new product.name ="namepro"if product.save client.update_attribute(:product_id,product.id)endend How to add...

View Article



Auditing and model lifecycle management for instances and their associations?

from: http://stackoverflow.com/questions/1615977/auditing-and-model-lifecycle-management-for-instances-and-their-associations   CRUD operations must be logged, including what the operation was, who the...

View Article

Rails practice: use after_commit

A relational database, like mysql, provides transactions to wrap several operations in one unit, make them all pass or all fail. All isolation levels except READ UNCOMMITTED don’t allow read data...

View Article

Different Ways to Set Attributes in ActiveRec

Rails 4 allows the developer to change ActiveRecord attributes in various ways. Each one does it slightly differently with sometimes unique side-effects. It’s important you understand which method to...

View Article

苹果的编程语言——Swift简介

Thanks Lucida for his work. http://zh.lucida.me/blog/an-introduction-to-swift/ 关于 这篇文章简要介绍了苹果于WWDC 2014发布的编程语言——Swift。 原文作者: Lucida Blog 新浪微博 豆瓣 转载前请保留出处链接,谢谢。 前言 在这里我认为有必要提一下Bret Victor的Inventing on...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images