when a request comes in, i delete all current user sections, and repopulate with new ones. Join them; it only takes a minute: Sign up Why do I get “The error occurred while evaluating nil.<=>” when using sort_by? is true, it will raises a NoMethodError exception with the message: undefined method `profiles_path' for # if @profile.new_record? share|improve this answer answered Dec 7 '10 at 20:21 the Tin Man 110k22136206 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using have a peek at these guys
You are limiting the result set to stories with at least five votes. The obvious workaround is to define singulars_path as singular_path in SingularsHelper, but a real fix would be nice. Embed Share Copy sharable URL for this gist. Thanks and regards, Swanand. https://gist.github.com/648080
Register here. assigns(:entry).new_record? comments powered by Disqus Recent Posts Installing IBM Websphere Integration Developer on Ubuntu 10 (March 31) Fixing MySQL and rubygem errors on a new rails 2.3.8 install (March 13) Fixing your
This is entries_controller.rb class EntriesController < ApplicationController before_filter :login_required, :only => [ :new, :create ] def index @entry = Entry.find(:all) end def new @entry = Entry.new end def show @entry = Join them; it only takes a minute: Sign up RoR crash on save “You have a nil object and you didn't expect it” up vote 0 down vote favorite 1 i You flagged this item as spam. share|improve this answer answered Jan 6 '11 at 14:06 David Sulc 18.4k33947 yeah, edited for more detail.
You might have expected an instance of Array. Workaround here: http://www.expressionlab.com/200... Is it dangerous to use default router admin passwords if only trusted users are allowed on the network? Share Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address.
My code looked like so : First the two models…. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # app/models/student.rb However I still get nil.new_record? is false, the message is You have a nil object when you didn't expect it! No registration required!
Reload to refresh your session. http://www.pixellatedvisions.com/2009/03/18/rails-2-3-nested-model-forms-and-nil-new-record Embed Embed this gist in your website. Unit tests please. Report post Edit Delete Reply with quote Re: form_tag error (model) Roberto Casadei (robyonrails) on 2007-04-30 13:43 Swanand Deodhar wrote: > Hi! > Unless i am missing something, there is no
Your amendment seems to work, but i'm getting null values passed to the script_metadatas table for the 'meta_key' and 'meta_value' fields. More about the author Thanks to the complex forms examples I was able to see where I was going wrong and put things right. I am not too sure what is <%= input%> Thanks and regards, Swanand Report post Edit Delete Reply with quote Re: form_tag error (model) Roberto Casadei (robyonrails) on 2007-04-30 13:59 Swanand And what is the code between new_section.user = user and new_section.save, if any ? –Zabba Jan 7 '11 at 6:23 | show 1 more comment 1 Answer 1 active oldest votes
input => http://api.rubyonrails.org/classes/ActionView/Help... Is Certificate validation done completely local? You might have expected an instance of ActiveRecord::Base.
Gravis September 17th, 2009 @ 11:09 AM +1 for this bug :) the result is pretty unexpected You flagged this item as spam. params[:script_metadatas][index.to_s]['id'] : nilAlex 3 Reply by pcdj 2007-08-16 11:09:18 pcdj Registered: 2007-07-04 Posts: 84 Re: Error occurred while evaluating nil. Hi Alex,Yes the line you mention is the line that the Skip to forum contentA forum for Ruby on Rails users Index User list Search Error occurred while evaluating nil. Rails Forum - Ruby on Rails Help and Discussion Forum I've just solved a little gotcha with the new nested models feature which shipped with rails 2.3.
Random noise based on seed How I explain New France not having their Middle East? What is causing the nil which knocks on to the NoMethodError on nil.new_record?