Hi,
I have created an application in rails but I am having problem in
computing taxable income from the supplied datas in the database .
How can I connect the database to the controller so that I can access
basic,hra, medical allowance etc from database to calculate it in
controller and display the output in view.
code that I have written in controller
class HomeController < ApplicationController
def index
@taxableincome= basic+hra
end
end
code that I have written in view
<h1>tax calculation</h1>
<br>
the taxableincome is = <%= @taxableincome %>
<%= link_to "old members", posts_path %> <%=link_to"enter new
details",new_post_path %>
If I want to make another link "taxableincome" whick will show me the
result of taxableincome as I click it how can I do it ?
since, I am having these problems I am unable to proceed.
please guide me to fix these problems.
Thankyou,
Regards,
Chandana Boral
On 9/14/09, Shakthi Kannan <[email protected]> wrote:
> Hi,
>
> --- On Mon, Sep 14, 2009 at 11:47 AM, Yevlempy(Harsh Verma)
> <[email protected]> wrote:
> | >>>>I installed sqlite by doing <yum install sqlite>
> \--
>
> 1. Please don't overquote like this. It is difficult to read! Please
> refer (Slide #10):
> http://www.shakthimaan.com/downloads/glv/presentations/mailing-list-etiquette.pdf
>
> 2. You need to install sqlite, and rubygem-sqlite3-ruby from yum, and
> gem install for sqlite3-ruby.
>
> ---
> | can't find header files for ruby.
> \--
>
> 3. You need to read the output! In future, also use a search engine
> for these error messages to find out how to fix it. I do not wish to
> spoon-feed you at every step. Next time when you post something, tell
> us what you did to debug the problem.
>
> Please refer slide #56:
> http://www.shakthimaan.com/downloads/glv/presentations/i-want-2-do-project-tell-me-wat-2-do.pdf
>
> Please install ruby-devel from yum. When you do development using a
> tool, it is important to install the -devel package as well.
>
> Regards,
>
> SK
>
> --
> Shakthi Kannan
> http://www.shakthimaan.com
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.dgplug.org/listinfo.cgi/users-dgplug.org
>
_______________________________________________
Users mailing list
[email protected]
http://lists.dgplug.org/listinfo.cgi/users-dgplug.org