Message from discussion
how to displya view from controller after fetching data from database ?
Received: by 10.50.182.132 with SMTP id ee4mr405046igc.5.1349426379982;
Fri, 05 Oct 2012 01:39:39 -0700 (PDT)
X-BeenThere: rubyonrails-core@googlegroups.com
Received: by 10.42.244.193 with SMTP id lr1ls1118834icb.1.gmail; Fri, 05 Oct
2012 01:39:34 -0700 (PDT)
Received: by 10.42.118.1 with SMTP id v1mr4854698icq.17.1349426374509;
Fri, 05 Oct 2012 01:39:34 -0700 (PDT)
Received: by 10.42.118.1 with SMTP id v1mr4854697icq.17.1349426374491;
Fri, 05 Oct 2012 01:39:34 -0700 (PDT)
Return-Path: <clan...@googlemail.com>
Received: from mail-oa0-f47.google.com (mail-oa0-f47.google.com [209.85.219.47])
by gmr-mx.google.com with ESMTPS id dd6si79053igc.0.2012.10.05.01.39.34
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 05 Oct 2012 01:39:34 -0700 (PDT)
Received-SPF: pass (google.com: domain of clan...@googlemail.com designates 209.85.219.47 as permitted sender) client-ip=209.85.219.47;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of clan...@googlemail.com designates 209.85.219.47 as permitted sender) smtp.mail=clan...@googlemail.com; dkim=pass header...@googlemail.com
Received: by mail-oa0-f47.google.com with SMTP id h1so1686576oag.20
for <rubyonrails-core@googlegroups.com>; Fri, 05 Oct 2012 01:39:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=20120113;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type;
bh=aotLyyAgql4KXwXjP6A0ROO1ZntqOZajk3tdP1NNt/w=;
b=Py2JXOdCxM/vvMdG4nYZq/SG+6UO9D1xP0CVrx4cQnPU5ljqjAfGIFB2GtLuGRYP/x
gG6FHQzyU5E74Y6v4PA6AKqiwvS7FWDyaTXOmrYHtd3pDxeP+bBROKxIcKmqtHrdnUq2
laqKZnN3uHdJM/NTtNAtQAVDXQW+O2BmHg0wFBaXSD1Or2VRVYI+niuPOkJGJDfnypiB
oOvVbMeOqvKPgPk0XRKIwbGIj6i1qKYSAyfUFQcM5XuXaT++b2nCdGk60BhWohc/05BC
6TnzC+sdajQxmIg4Ifya30RdmzsYlVQ9sh1NLy6ZJwl+1WeehJ7z+F//UzOYQp+cLCRm
EKNg==
Received: by 10.182.1.72 with SMTP id 8mr6459631obk.61.1349426374149; Fri, 05
Oct 2012 01:39:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.182.76.202 with HTTP; Fri, 5 Oct 2012 01:39:03 -0700 (PDT)
In-Reply-To: <f0eefb31-019a-4b84-8065-9421bb92d573@googlegroups.com>
References: <f0eefb31-019a-4b84-8065-9421bb92d573@googlegroups.com>
From: Colin Law <clan...@googlemail.com>
Date: Fri, 5 Oct 2012 09:39:03 +0100
Message-ID: <CAL=0gLuAN+PwctOn5+hWRde9woBc9Exy9N7KDk7+K73kkbM...@mail.gmail.com>
Subject: Re: [Rails-core] how to displya view from controller after fetching
data from database ?
To: rubyonrails-core@googlegroups.com
Content-Type: text/plain; charset=UTF-8
On 5 October 2012 07:11, abhijit muke <abhijit.muke...@gmail.com> wrote:
> how would i display data in my spList view from my Controller sportList ..??
> I want to fetch this data from database..Model has been created for table
> name Sports..
> {class Sports < ActiveRecord::Base
> attr_accessible :date_created, :deleted, :id, :last_updated, :sports_name,
> :version
>
> end}
>
>
> which database query should I write in sportList Controller to dispylay data
> in spList view....please suggess...
I suggest you work through some tutorials to understand the basics of
Rails. railstutorial.org is good and is free to use online. Make
sure that any tutorial you use is for Rails 3 and that you have
installed the correct version to match the tutorial.
Colin