[Rails] Undefined method error

2012-07-18 Thread One Two
I have been working on a project based on Michael Hartl's book Ruby on Rails Tutorial in order to try to teach myself Ruby on Rails. However, when it tries to render a form designed to allow a user to submit a small message, I get an error saying, undefined method `model_name' for NilClass:Class.

Re: [Rails] Undefined method error

2012-07-18 Thread Sam Serpoosh
when you want to create a blank instance of a model for a form's sake like this scenario, you should create that blank instance in the controller's action which leads to that specific view you're rendering the form in. As I recall in Michael Hartl's Ruby on Rails Tutorial sample application you

[Rails] undefined method error because I am not understanding Rails initializers

2011-04-25 Thread John Merlino
Hey all, In app/builders, I have a file called table_builder.rb. In the constructor method of my TableBuilder class, I call an instance method called assign_attributes which takes a hash and converts the key/value pairs into instance methods. The assign_attributes method is declared in the

[Rails] Undefined method error when loading schema (Win 7)

2010-05-19 Thread Zooey
I'm trying to run an existing project on a new installation of Rails on a Windows 7 machine. When I try to load the schema, I get: rake aborted! undefined method `full_name' for \377\376-:String I can't figure out what is causing the error. My best guess is some kind of gem conflict, but

[Rails] undefined method error

2010-03-31 Thread Gautam
I am getting the following error when trying to link a method in a view so that it can be called on that very object(id). undefined method `abc_notice_path' for #ActionView::Base:0xed65220 Extracted source (around line #25): 22: %= link_to 'Edit', edit_notice_path(@notice) % | 23: %= link_to

Re: [Rails] undefined method error despite the fact it doesn't exist

2010-03-19 Thread Colin Law
On 18 March 2010 23:43, John Merlino li...@ruby-forum.com wrote: Hey all, I'm getting a strange, unexplainable error. It returns undefined method `render_index_row_action_pprove'. I performed a search on my entire application and no such method exists. There is a

[Rails] undefined method error despite the fact it doesn't exist

2010-03-18 Thread John Merlino
Hey all, I'm getting a strange, unexplainable error. It returns undefined method `render_index_row_action_pprove'. I performed a search on my entire application and no such method exists. There is a render_index_row_action_approve but not a render_index_row_action_pprove. NoMethodError in

[Rails] undefined method error appears in erb but not haml

2010-02-28 Thread JohnMerlino
Hey all, All I wanted to do was convert a haml file to erb. After doing so, i get an undefined method `render_sequence_nav' error message. Even though no such error happened when it was in haml format. I believe the culprit is this line which I am converting incorrectly: #fields

Re: [Rails] undefined method error appears in erb but not haml

2010-02-28 Thread Michael Pavling
On 28 February 2010 13:00, JohnMerlino stoici...@aol.com wrote: I converted it to this:                % div id=fields fields /div render_sequence_nav(sequence_info, div id=fields%= render_sequence_nav(sequence_info, students_path) %/div -- You received this message because you are

[Rails] undefined method error appears in erb but not haml

2010-02-25 Thread John Merlino
Hey all, All I wanted to do was convert a haml file to erb. After doing so, i get an undefined method `render_sequence_nav' error message. Even though no such error happened when it was in haml format. I believe the culprit is this line which I am converting incorrectly: #fields

[Rails] Undefined Method error - help request

2009-12-18 Thread SMR
Good morning All - I am working on a time tracking application as a learning excercise and have run into an error neither I nor Google can remedy. When loading my view, I get an error: 'undefined method 'true_class_path' for #ActionView::Base:. Context: I have controllers for Project,

[Rails] undefined method error from atom builder

2009-07-12 Thread Nathan Beyer
I have a simple controller that takes a request, looks up some data and then returns the results as either HTML or Atom. The HTML response works fine, but the Atom Builder is blowing up with an undefined method error that I can't figure out. It seems to be failing when the ActiveRecord instance

[Rails] Undefined Method error when creating method for collection of objects

2009-04-02 Thread Rick
Hi I am learning rails and have hit a bit of a wall. I have created methods previousley that work fine on a single object. However in my latest project I am trying to calculate the total cost of a group of phonecalls and I am having difficulty creating a method to calculate this. I have a

[Rails] undefined method error for a polymorphic route

2009-01-25 Thread pk16
Hi, I'm trying to upgrade a 2.0.2 app to 2.2.2, but first I decided to upgrade to 2.1.2 after reading some posts recommending to do this. After firing up the app and running my tests, I now see that my polymorphic routes seem to be broken. test_should_create_footerpage(PagesControllerTest):

[Rails] Undefined Method error

2008-12-28 Thread Daniel
OK. I have 4 models, item/category/subcategory/brand association like following item belongs_to :brands belongs_to :categories belongs_to :subcategories brand has_many :items category has_many :items has_many :subcategories subcategory has_many :items belongs_to :category I also have

[Rails] undefined method-error

2008-12-18 Thread Daniel Süpke
Hi, I'm new to rails and so far think it's great, but I'm having some major issues with a many-through relationship. There are three tables: reporttemplates articlestemplates_reporttemplates (additional attribute optional) articletemplates They are connected to each other via has_many and