search for: item_body

Displaying 1 result from an estimated 1 matches for "item_body".

2006 Apr 12
1
Dynamically updating list
hi every body. i am try to do example of agil books.dynamically updating list of chapter 18. 1)this is my code for controller---- class ListnoajaxController < ApplicationController def index @items = Item.find_recent end def add_item item = Item.new(params[:item_body]) render(:partial => "item", :object => item) end def item end end 2)the code for item class in app/model class Item < ActiveRecord::Base attr_reader :body attr_reader :posted_on FAKE_DATABASE = [] def initialize(body) @body = body @posted_on = Time.now FAKE_DATABASE.unshift(sel...