Displaying 20 results from an estimated 40000 matches similar to: "undefined local variable or method `errors'' for Customer:Class"
2006 Nov 07
2
undefined local variable or method `invoices' for Provider:Class
I''m pretty new to Rails, and I think my app has progressed quicker than
my knowledge of Rails/Ruby has ...
I have the following models:
[ -- Begin -- ]
class Provider < ActiveRecord::Base
has_many :invoices
has_one :user
def self.get_invoices
invoices.find(:all)
end
end
class User < ActiveRecord::Base
belongs_to :Provider
belongs_to :Consumer
def
2005 Dec 02
1
undefined local variable or method `errors' for Listing:Clas
I have a listing model in which I''m trying to validate a date (2005, 2,
29 - is not a valid date).
def self.validate_date(year, month, day)
unless Date::valid_date?(year.to_i, month.to_i, day.to_i)
errors.add(:start_date, "De startdatum moet geldige datum zijn.")
end
end
But everytime I call this code I get:
undefined local variable or method
2006 Mar 14
4
Two Customer Types - Best Design Principle?
Hi all,
I''ll do my best to explain this... I have the possibility to have two
customer types in my system:
1. A "mailing list" type: new records are saved when user enters email
address in the mailing list subscription form.
2. A "full" type: new records are saved when the user buys something and
provides all their billing/shipping details, etc.
Model:
-
2008 May 03
0
Assessing Customer Satisfaction and Agile Project Management - PhD Dissertation
This is a reminder. Please distribute this email. Data on both agile and
plan-driven projects are welcome.
To Whom It May Concern,
My name is Donald Buresh, and I am a Ph.D. student at Northcentral
University located in Prescott Valley, Arizona. The reason that I am writing
to you is because I would like you to participate in an internet survey for
my dissertation. The topic of my
2006 May 03
0
getting error like undefined local variable or method `confi
Hi,
This is one of the method in "spam_protection.rb" in typo 2.6.0
application.
========================
def article_closed?(record)
if config[''sp_article_auto_close''] > 0
if record.article.created_at.to_i <
config[''sp_article_auto_close''].days.ago.to_i
logger.info("[SP] Blocked interaction with
undefined local variable or method `calendar_date_select_includes' for #<ActionView::Base:0x7bfd920>
2011 Mar 18
1
undefined local variable or method `calendar_date_select_includes' for #<ActionView::Base:0x7bfd920>
Here''s what I did:
1. gem install calendar_date_select
2. Then in my environment.rb I put:
config.gem "calendar_date_select"
3. And in my template file:
<%= javascript_include_tag "prototype" %>
<%= calendar_date_select_includes %>
But still an error posts like this : undefined local variable or
method `calendar_date_select_includes'' for
2014 Apr 06
0
undefined local variable or method `message' (NameError)
I am trying to learn Rspec-Cucumber tutorial by referring to "The
Pragmatic Programmers - The Rspec Book". I am on the 4th chapter and
seems to be stuck with an error and not able to move forward.I have
followed exactly as per the tutorial but it is showing the below error
`( in line : output.messages.should include(message))`when I try to run
cucumber feature in my console.
**undefined
2006 Aug 31
1
Peculiar validation error: undefined local variable or method 'fieldWithErrors'
Hello all,
I''m submitting a form with the following field -
<%= p.text_field :postcode, {:class => ''inputMedium''} %>
and on submitting the form I am getting this error -
NameError in Property#create
Showing app/views/property/sell.rhtml where line #52 raised:
undefined local variable or method `fieldWithErrors'' for #<Object:
0x1de968>
2006 Jan 29
1
Why am I getting "undefined local variable or method `acts_as_taggable''"?
Hello,
I recently installed acts_as_taggable using the following command:
gem install acts_as_taggable
# output follows
Attempting local installation of ''acts_as_taggable''
Local gem file not found: acts_as_taggable*.gem
Attempting remote installation of ''acts_as_taggable''
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed
2009 Aug 31
3
NameError: undefined local variable or method `testapp' for main:Object
Hi,
I am new to Ruby on Rails. Recently, I downloaded and installed the
InstantRails in the D:\ drive of my system. Now I wanted to try some
small examples in ''irb'', so I created a file "testapp.rb" and in that
pasted a code like this:
========================
class sample_class
def sample_method
puts "sample program"
end
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error:
undefined local variable or method `cart_item'' for
#<#<Class:0x3715a78>:0x3715a48>
Session info says the cart being updated properly. I''m just not able
to output two variables:
<%= cart_item.quantity %> × <%= h(cart_item.title) %>
I did some research, and I can grasp that local
2006 Apr 21
5
Simple Question: How to merge SQL results?
Hopefully an easy one, how do I merge two or more SQL query results?
Example:
result1 = find_by_sql(x)
result2 = find_by_sql(y)
What is the best way to merge result1 and result2? I want to be able
to reference the objects as if they were obtained via one query.
Cheers,
Dan
2007 Jan 21
6
rake db:migrate "undefined method `default'" error
Hi all,
Just starting with Rails and working through the early chapters of the
Pragmatic Programmers Agile Development with Rails book (2nd addition).
When doing a "rake db:migrate" to add a column to a table I get this:
undefined method `default'' for
#<ActiveRecord::ConnectionAdapters::MysqlAdapter:0xb7517ec8>
Any ideas?
thanks,
David
PS: Here''s the full
2006 Mar 05
3
"Undefined method" problem in "Agile Web Development With Rails"
Hi,
I''m reading the "Agile Web Development With Rails" book. So long,
everything has worked fine, but now I got this annoying error message
that I just can''t understand. The error appears for me around page
87, chapter 8.
NoMethodError in Store#display_cart
Showing app/views/store/display_cart.rhtml where line #28 raised:
undefined method `product''
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2006 Mar 26
3
Using a Gem in your App without installing to the system
Does anyone know how to use a gem without installing it to the rails
installation? For example, I can download the Money gem package from
http://dist.leetsoft.com/ but if I don''t have the ability to install a
gem at my hosting provider, how can I use the gem in my app?
Cheers,
Dan
2009 Jan 04
3
undefined local variable or method `acts_as_list'
So I seem to be having an issue with trying to install acts_as_list in
rails 2.2.2?
I have downloaded the files from: http://github.com/rails/acts_as_list/tree/master
I have put the files in the vendor/plugins folder the files are as
follows:
vendor/plugins/acts_as_list/init.rb
vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
vendor/plugins/acts_as_list/test/list_test.rb
2012 Mar 10
4
undefined local variable or method 'game'
I am doing a web shop assignment and have got a problem with my action
mailer.
I get an error undefined local variable or method ''game''
I have the following in my mailer:
def game_interest(user, game)
@user = user
@game = Game
mail :to => user.email, :subject => "Game Interest"
end
and the following in my controller:
def email
@game =
2006 Mar 27
15
Go Go Gadget - A Rails ecommerce site released today
I''ve just completed my first Ruby on Rails project, an online store for
electronic gadgets including digital cameras, MP3 players and PDAs.
It''s for Australian shoppers only, but everyone can take a look and
browse through!
http://www.gogogadget.com.au
All feedback, comments, etc are welcome.
Cheers,
Dan
2006 Mar 25
4
Rails PayPal and Currencies other than USD
Has anyone been able to make direct API calls to PayPal in currencies
other than USD? I get an error message "The currency code submitted is
not supported. Check the currency code and try again."
I''m using the PayPal plugin for Rails. I can successfully transact in
USD, but not AUD (Australian Dollars).
Cheers,
Dan