28 Mar '17, 10am

ruby: 【Rails】WEB APIを長く運用するための仕組み化 - VASILY DEVELOPERS BLOG https://t.co/L9aUaBZLsV

ruby: 【Rails】WEB APIを長く運用するための仕組み化 - VASILY DEVELOPERS BLOG https://t.co/L9aUaBZLsV

# contextで指定されたfieldgroupのサイズを取得する処理 def hash_group_name context[:fieldgroup ].present? ? context[:fieldgroup ].to_sym : :large end # 各サイズで定義されたキーの内容を引いてきて、JOINする処理 def to_hash case hash_group_name when :small to_hash_fieldgroup(:small ) when :medium to_hash_fieldgroup(:small ) .merge(to_hash_fieldgroup(:medium )) when :large to_hash_fieldgroup(:small ) .merge(to_hash_fieldgroup(:medium )) .merge(to_hash_fieldgroup(:large )) end end def fieldgroup_keys (name) self .class.fieldgroup_keys(name) end private # Draper::Decoratorの機能を利用してfieldgroupに定義された各キーを引き、Hashに直す処理 def to_hash_fieldgroup (group_name) Hash [fieldgroup_keys(group_name).map { |

Full article: http://tech.vasily.jp/entry/api_rule

Tweets

Hiring Ruby on Rails (ROR) Developers

hasjob.co 30 Mar '17, 5am

Strong and proven Skills in Ruby On Rails Programming Good knowledge of Cloud Computing and Internet Technologies like HTM...

IT Programmer - Ruby on Rails Web Developer di ...

urbanhire.com 28 Mar '17, 6am

Semua yang Anda butuhkan untuk mempermudah pencarian pekerjaan dan perekrutan karyawan, ada dalam satu tempat. Pencari ker...

【過去の記事】 simple_formからdatepickerを使うには~ui_datepic...

blog.scimpr.com 27 Mar '17, 3pm

group :assets do gem 'jquery-ui-rails' end gem 'ui_datepicker-rails3'

IT Programmer - Ruby on Rails Web Developer di ...

urbanhire.com 27 Mar '17, 12am

Semua yang Anda butuhkan untuk mempermudah pencarian pekerjaan dan perekrutan karyawan, ada dalam satu tempat. Pencari ker...

Ruby on Rails Web App web host finalization by ...

freelancer.com 24 Mar '17, 12pm

Welcome to Orange Techsol IT Software Solution, Orange Techsol is a certified IT company based in India and has been in th...

Ethereum DEV Developers Join Lunyr Team as Tech...

news.bitcoin.com 28 Mar '17, 6am

This is a paid press release, which contains forward looking statements, and should be treated as advertising or promotion...