[Rails] Re: No Method error

Alana
Mon, 10 Apr 2006 13:58:12 -0000

Sorry, the controller is as follows. What data do you need?


class TblregisteredphoneController < ApplicationController
	layout "standard-layout"
	scaffold :tblregisteredphone

	def delete
		Tblregisteredphone.find(@params[''id'']).destroy
		redirect_to :action => ''list''
	end

	def create
		@tblregisteredphone =
Tblregisteredphone.new(@params[''tblregisteredphone''])
		@tblregisteredphone.txtregisterdatetime = Time.now
		if @tblregisteredphone.save
			redirect_to :action => ''list''
		else
			render_action ''new''
		end
	end

	def new
		@tblregisteredphone = Tblregisteredphone.new
		@tbluser = Tbluser.find_all
	end

	def list
		@tbluser = @params[''tbluser'']
		@tblregisteredphones = Tblregisteredphone.find_all
	end

	def edit
		@tblregisteredphone = Tblregisteredphone.find(@params["id"])
		@tbluser = Tbluser.find_all
	end
end