Skip to content

Instantly share code, notes, and snippets.

View hakanensari's full-sized avatar

Hakan Ensari hakanensari

  • Amsterdam
  • 18:50 (UTC +02:00)
View GitHub Profile
html = "".tap do |str|
str << '<table>'
str << '<tr>'
str << '<td>'
str << 'a'
str << '</td>'
str << '<td>'
str << 'b'
str << '</td>'
str << '</tr>'
class PagesController < ApplicationController
before_filter :login_required, :except => [ :show ]
# GET /pages
# GET /pages.xml
def index
@pages = Page.find(:all)
respond_to do |format|
format.html # index.html.erb
class PagesController < ApplicationController
before_filter :login_required, :except => [ :show ]
# GET /pages
# GET /pages.xml
def index
@pages = Page.find(:all)
respond_to do |format|
format.html # index.html.erb