From: Colin Law <clan...@googlemail.com>
Date: Wed, 17 Oct 2012 12:23:39 +0100
Local: Wed, Oct 17 2012 7:23 am
Subject: Re: [Rails] NoMethodError (undefined method `service_options' for nil:NilClass)
On 17 October 2012 12:14, Nirav <nirav.mtech...@gmail.com> wrote:
> hi i am using rails 2.3.4 and i am facing "no method error"
The important bit of this message is the bit about nil. You have
> there is possibility to not find method but my question is - is there
> error trace:
> Processing QuoteRequestsController#create (for 127.0.0.1 at 2012-10-17
> NoMethodError (undefined method `service_options' for nil:NilClass):
tried to call a method service_options on something that is nil. > vendor/extensions/smartmove/app/controllers/quote_requests_controller.rb:13 6:in
> @regions = ServiceDescription.find_by_name('region').service_options
is no record in the service_descriptions database with that name. > in my database table is there service_descriptions and service_options. is
I suggest you work through some tutorials on Rails in order to understand the basic principles. A few days doing that will save you a lot of time in the long run. railstutorial.org is good and is free to use online. Make sure that you install the version of rails that the tutorial expects. Colin
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||