18. HABTM using Subscriptions class Member has_many :subscriptions end class Portal has_many :subscriptions end class Subscription belongs_to :member belongs_to :portal end
19.
20.
21. Transactions (InnoDB) Member.transaction(@member, @friend) do @member.friends << @friend unless @member.friends.include?(@friend) @friend.friends << @member unless @friend.friends.include?(@member) end
22. Blog Claims def claim_verify @wb= Weblog.find_by_url(@params[:url]) require 'open-uri‘ @found = open(@wb.url).read.include?(@wb.v_key) end
23.
24. Tagging class Article < ActiveRecord::Base acts_as_taggable :join_class_name => ' TagArticle ‘ class TagArticle belongs_to :article, :class_name => ' Article ', :foreign_key => 'article_id‘ @tagged = Article.tags_count(:limit => 10) Tagging an article @article = Article.new @article.tag “mysql conference ror” Tags for an article @tags = @article.tags() Tag Cloud (Tom Fakes)
25. In place editing class BlogsController < ApplicationController in_place_edit_for :weblog, :description <%= in_place_editor_field :weblog, :description, :value=>'' %> In your views file In your model