Skip to content

Instantly share code, notes, and snippets.

View keikun17's full-sized avatar

Cakey | Buddy Magsipoc keikun17

View GitHub Profile
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
PhRUG Celebrity Names
Ricky Sta Cruz
Byron Bibat
Terry Ponce
Francis Magsipoc (aka Francis M)
Florence Magsipoc
Elmer Gaspar
Error Fornoles
Raymond Tayag
def tag_list=(tags_string, current_user)
self.taggings.destroy_all
tag_names = tags_string.split(",").collect{|s| s.strip.downcase}.uniq
tag_names.each do |tag_name|
tag = current_user.tags.find_or_create_by_name(tag_name)
tagging = self.taggings.new # <= code smell
tagging.tag_id = tag.id # <= code smell
end