Forum: Ruby on Rails about show list

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Thiti P. (Guest)
on 2009-03-26 11:44
(Received via mailing list)
i want to create database for individual user .
when user login and add sequences in to database .the web page show
list of  sequences that user have in database. but when i try show the
list of  of  sequences
.it's show all list of sequence in database. such as the total
sequences that  user A add are 3 items and  the total sequences that
user B add are 5 items.
when user A login and want to see own   data .the web page show 8 fact it's show 3 items. how i fix this the problem.
>>class ComponentsController < ApplicationController
  before_filter :protect, :only => [:show, :edit]
  def index
    @title = "list of  sequences"
    @items = Seq.find(:all)
 def databases
    @title = "Database"
    if params[:seq]
      @seq =[:seq])
          flash[:notice] = "sequence submitted !"
        redirect_to  :action => "show", :id =>
Ar C. (Guest)
on 2009-03-26 15:43
>   def index
>     @title = "list of  sequences"
>     @items = Seq.find(:all)
>   end

That method shouldn't be doing a wide-open find. You need to scope the
find somehow, and deal with the case where the current user isn't logged
in yet.
Thiti P. (Guest)
on 2009-03-26 17:59
(Received via mailing list)
thank you for your suggestion .

2009/3/26 Ar Chron <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.