Skip to content

Instantly share code, notes, and snippets.

View jirikolarik's full-sized avatar

Jiri Kolarik jirikolarik

View GitHub Profile
@jirikolarik
jirikolarik / gist:6641406
Last active December 23, 2015 13:19
Install RVM + Passenger + Apache
# Install RVM
\curl -L https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
# Install Ruby
rvm install 2.0.0
# Install passenger
gem install passenger
@jirikolarik
jirikolarik / page.rb
Last active December 17, 2015 23:38
Globalize3 + RailsAdmin
# app/models/page.rb
class Page < ActiveRecord::Base
validates :translations, presence: :true
translates :name, :content
accepts_nested_attributes_for :translations, allow_destroy: true
mount_uploader :image, ImageUploader
def to_param