Skip to content

Instantly share code, notes, and snippets.

View jameslafa's full-sized avatar
🖤

James Lafa jameslafa

🖤
  • Personio
  • Berlin, Germany
View GitHub Profile
@jameslafa
jameslafa / active_admin.rb
Created July 29, 2013 13:59 — forked from fred/active_admin.rb
Show pretty booleans in active_admin
# It extends activeadmin to show pretty boolean values
#
# config/initializers/active_admin.rb
module ActiveAdmin
module Views
class TableFor
def bool_column(attribute)
column(attribute){ |model| model[attribute] ? '✔'.html_safe : '✗'.html_safe }
end
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
@jameslafa
jameslafa / event.rb
Last active July 5, 2019 23:32 — forked from bbonamin/event.rb
Handle translations with Globalize3 in Active Admin with Rails 4
#app/models/event.rb
class Event < ActiveRecord::Base
translates :title, :description, :summary
has_many :event_translations
accepts_nested_attributes_for :event_translations, :allow_destroy => true
end