This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder