Skip to content

Instantly share code, notes, and snippets.

View Tronerta's full-sized avatar
🐋
Working from home

Illia Tverdokhlib Tronerta

🐋
Working from home
  • COMP Centrum Innowacji
  • Warsaw, Poland
View GitHub Profile
@prog1dev
prog1dev / gist:62660be194ce4aec73721a0af1665983
Last active April 29, 2020 12:48
download_zip method without temp files
def download_zip(image_list)
unless image_list.blank?
file_name = 'pictures.zip'
stringio = Zip::ZipOutputStream::write_buffer do |z|
image_list.each do |img|
title = img.title
title += '.jpg' unless title.end_with?('.jpg')
z.put_next_entry(title)
@serghost
serghost / rails_admin.ru.yml
Created March 3, 2016 12:24
RU translation for the gem 'rails_admin' (перевод гема rails_admin)
# 02.03.2016 Перевод gem rails_admin ~> 0.8
# Не забудьте добавить переводы названия модели (в т.ч. мн. ч.) и - опционально - атрибутов.
# Некоторые переводы, где нужны склонения, видоизменены, тем не менее, имхо,
# это не повлияло на удобство интерфейса
ru:
admin:
js:
true: 'True'
false: 'False'
@burtlo
burtlo / rails_features.md
Created February 17, 2013 06:39
Some common errors after finishing the Jumpstart Lab Blogger tutorial a number of times.

Rake Routes

Problem

Running rake routes with a new rails application displays no information.

Solution