Changeset 229

Show
Ignore:
Timestamp:
05/03/07 12:33:44 (1 year ago)
Author:
e.@brainspl.at
Message:

adding brain takita's rspec_on_merb plugin/patch for mrblog. Awesome patch brian, thanks closes #36

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mrblog/trunk/dist/app/controllers/admin.rb

    r153 r229  
    66  def index 
    77    #puts Merb::RenderMixin.erbs.inspect 
    8     @pager = Merb::Paginator.new(Post.count, Merb::PER_PAGE) do |offset, per_page| 
     8    @pager = Merb::Paginator.new(Post.count, MrBlog::PER_PAGE) do |offset, per_page| 
    99            Post.find(:all, :limit => per_page, :offset => offset, :order => 'created_at DESC') 
    1010          end 
  • mrblog/trunk/dist/app/controllers/blog.rb

    r153 r229  
    88 
    99  def index 
    10     @pager = Merb::Paginator.new(Post.count, Merb::PER_PAGE) do |offset, per_page| 
     10    @pager = Merb::Paginator.new(Post.count, MrBlog::PER_PAGE) do |offset, per_page| 
    1111            Post.find(:all, :limit => per_page, :offset => offset) 
    1212          end 
  • mrblog/trunk/dist/app/views/admin/index.herb

    r143 r229  
    1616<%= link_to("Next", "/admin/index?page=#{@page.next.number}") if @page.next? %></p> 
    1717<%= link_to image_tag('new.gif'), "/admin/new"%>  
    18  
    19  
    20  
    21 <h1>CHanged!</h1> 
  • mrblog/trunk/dist/schema/migrations/002_add_sessions_table.rb

    r133 r229  
    22  def self.up 
    33    create_table :sessions, :force => true do |t| 
    4         t.column :id,          :integer, :null => false 
    54        t.column :session_id,      :string,  :limit => 32 
    65        t.column :created_at,  :datetime 
  • mrblog/trunk/dist/schema/schema.rb

    r133 r229  
    66 
    77  create_table "comments", :force => true do |t| 
    8     t.column "post_id", :integer 
    9     t.column "name", :string 
    10     t.column "body", :text 
     8    t.column "post_id",    :integer 
     9    t.column "name",       :string 
     10    t.column "body",       :text 
    1111    t.column "created_at", :datetime 
    1212    t.column "updated_at", :datetime 
     
    1414 
    1515  create_table "posts", :force => true do |t| 
    16     t.column "title", :string 
    17     t.column "body", :text 
     16    t.column "title",      :string 
     17    t.column "body",       :text 
    1818    t.column "created_at", :datetime 
    1919    t.column "updated_at", :datetime 
    20     t.column "intro", :string 
     20    t.column "intro",      :string 
    2121  end 
    2222 
    2323  create_table "sessions", :force => true do |t| 
    24     t.column "session_id", :string, :limit => 32 
     24    t.column "session_id", :string,   :limit => 32 
    2525    t.column "created_at", :datetime 
    26     t.column "data", :text 
     26    t.column "data",       :text 
    2727  end 
    2828 
    29   add_index "sessions", ["session_id"], :name => "session_id_index" 
    3029  add_index "sessions", ["session_id"], :name => "sessions_session_id_index" 
    3130 
    3231  create_table "users", :force => true do |t| 
    33     t.column "login", :string, :limit => 40 
    34     t.column "email", :string, :limit => 100 
    35     t.column "crypted_password", :string, :limit => 40 
    36     t.column "salt", :string, :limit => 40 
    37     t.column "created_at", :datetime 
    38     t.column "updated_at", :datetime 
     32    t.column "login",            :string,  :limit => 40 
     33    t.column "email",            :string,  :limit => 100 
     34    t.column "crypted_password", :string,   :limit => 40 
     35    t.column "salt",             :string,  :limit => 40 
     36    t.column "created_at",       :datetime 
     37    t.column "updated_at",       :datetime 
    3938  end 
    4039