# File lib/cimi/helpers/cimi_helper.rb, line 19 def expand?(collection) params['$expand'] == '*' || (params['$expand'] || '').split(',').include?(collection.to_s) end
# File lib/cimi/helpers/cimi_helper.rb, line 29 def href_id(href, entity) split_on = self.send(:"#{entity.to_s}_url") href.split("#{split_on}/").last end
# File lib/cimi/helpers/cimi_helper.rb, line 24 def no_content_with_status(code=200) body '' status code end
# File lib/cimi/helpers/cimi_helper.rb, line 34 def to_kibibyte(value, unit) case unit when "GB" (value*1024*1024).to_i when "MB" (value*1024).to_i else nil # should probably be exploding something here... end end