# File lib/cimi/helpers/cimi_helper.rb, line 24 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 19 def no_content_with_status(code=200) body '' status code end
# File lib/cimi/helpers/cimi_helper.rb, line 29 def to_kibibyte(value, unit) case unit when "GB" value*1024*1024 when "MB" value*1024 else nil # should probably be exploding something here... end end