会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
耿小曾
博客园
首页
新随笔
联系
订阅
管理
2016年6月25日
postgre 事务隔离
摘要: https://github.com/angelfan/DayDayUp/blob/master/note/transaction_isolation.md 事务隔离 MVCC的实现方法有两种: 1.写新数据时,把旧数据移到一个单独的地方,如回滚段中,其他人读数据时,从回滚段中把旧的数据读出来; 2
阅读全文
posted @ 2016-06-25 21:17 耿小曾
阅读(771)
评论(0)
推荐(0)
2016年3月12日
分离出表单对象(Form Objects)
摘要: https://github.com/angelfan/DayDayUp/blob/master/note/form_object.md#%E5%88%86%E7%A6%BB%E5%87%BA%E8%A1%A8%E5%8D%95%E5%AF%B9%E8%B1%A1form-objects 分离出表单
阅读全文
posted @ 2016-03-12 14:47 耿小曾
阅读(250)
评论(0)
推荐(0)
2016年3月7日
presenter on rails
摘要: https://github.com/angelfan/DayDayUp/blob/master/note/presenter.md presenter on rails ruby on rails 属于 MVC 框架, 对于简单的应用三层可能就够用了, 但是当应用越来越复杂可能就需要更多的抽象层来
阅读全文
posted @ 2016-03-07 22:32 耿小曾
阅读(293)
评论(0)
推荐(0)
2016年3月3日
关于回调
摘要: https://github.com/angelfan/DayDayUp/blob/master/note/callback.md
阅读全文
posted @ 2016-03-03 23:55 耿小曾
阅读(97)
评论(0)
推荐(0)
2016年3月1日
api with doorkeeper
摘要: https://github.com/angelfan/DayDayUp/blob/master/note/doorkeeper.md
阅读全文
posted @ 2016-03-01 22:21 耿小曾
阅读(119)
评论(0)
推荐(0)
2016年2月29日
ransack 支援json字段检索
摘要: 支援json字段 ransacker :json_key do |parent| Arel.sql "(#{parent.table.name}.json_column->>'json_key')" end 支援hstore ransacker :hstore_key do |parent| Are
阅读全文
posted @ 2016-02-29 18:04 耿小曾
阅读(135)
评论(0)
推荐(0)
2016年2月24日
reduce and each_with_object
摘要: target = [{material: 'legend', quantity: '5'}, {material: 'angel', quantity: '10'}, {material: 'angel', quantity: '5'}] target.each_with_object(Hash.n
阅读全文
posted @ 2016-02-24 10:16 耿小曾
阅读(126)
评论(0)
推荐(0)
2016年2月23日
sidekiq 删除相关worker
摘要: Sidekiq::Queue.new('default').select do |job| job.klass == 'WorkerClass' && job.args[0]['xxx'] == "25471" end.each(&:delete) Sidekiq::RetrySet.new.sel
阅读全文
posted @ 2016-02-23 20:36 耿小曾
阅读(368)
评论(0)
推荐(0)
2016年2月22日
Rails 中的事物处理
摘要: 1. 使用事物的原因 保证数据一致性, 当其中出现一个失败的时候,操作可以回滚 比如: ActiveRecord::Base.transaction do david.withdrawal(100) # withdrawal失败必须触发 exception mary.deposit(100) # d
阅读全文
posted @ 2016-02-22 23:36 耿小曾
阅读(585)
评论(0)
推荐(0)
2015年10月13日
Use of UUID(Universally unique identifier) in Ruby On Rails Application.
摘要: https://gurudathbn.wordpress.com/2014/10/12/use-of-uuiduniversally-unique-identifier-in-ruby-on-rails-application/
阅读全文
posted @ 2015-10-13 19:36 耿小曾
阅读(125)
评论(0)
推荐(0)
下一页
公告