similar to: undefined method `model_name' for NilClass:Class in rails 3.0.0

Displaying 20 results from an estimated 6000 matches similar to: "undefined method `model_name' for NilClass:Class in rails 3.0.0"

2011 Sep 09
2
acst_as_solr error
hi, i am using https://github.com/mattmatt/acts_as_solr it shows the following error "undefined method ''each'' for " for this results = Employee.find_by_solr(@id) results.each do |emp| puts emp.id end where plugin does not contains "each" method in acts_as_solr/libs/ search_results.rb so for me each is not working with ActsAsSolr::SearchResults
2011 Sep 08
8
acts_as_solr problem ActsAsSolr::SearchResults:
hi, i am using acts_as_solr plugin when i tried with search by def search puts "#####################" # ids = params[:name] @id = params[:query] @emp = Employee.find_by_solr(@id) puts "------------------------------#{@emp}" respond_to do |format| format.html{render :action => ''search''} format.xml end
2011 Sep 14
5
rjs error TypeError: element.getElementsByTagName is not a function in rails 3+jquery
hi, i am using rails 3.0.10 i am trying with sample application for searching data from table and updating my search.html.erb file is <%= form_for (@employee) do |s|% <div id ="search_details"> <%= s.text_field :name%> <%= s.text_field :emp_id, :onfocus => ''sal(document.getElementById(''employee_name'').value);''%>
2011 Sep 21
5
problem with submit button in rails 3
hi, i am using <%= s.submit ''Product save'' %> when i click it, following error appears " Routing Error uninitialized constant ProductsController" could any one provide me solution ? thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2011 May 27
4
undefined method `model_name' for NilClass:Class in a form_for
Hi! I know that there are other topics about this issue, I read them and I''m always blocked. Here is the error message: undefined method `model_name'' for NilClass:Class Extracted source (around line #30): 27: 28: <h2>Add Translation</h2> 29: 30: <%= form_for @new_trad do |f| %> 31: Locale: <%= f.text_field :locale %> 32: Key : <%=
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2011 Oct 17
1
problem with auto increment in rails 3
hi, i am tried to use auto increment field for user_id field but it fails to do it create_table :users,:id => false,:primary_key => ''user_id'', :force => true do |t| t.integer :user_id,:auto_increment => true, :null => false t.string :name t.string :email t.timestamps end is there any syntax to do auto increment in rails
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All, just in a spot of bother with this gem, I am trying to create a new location and get the above msg. here is my controller: class LocationsController < ApplicationController # GET /locations # GET /locations.json def index @locations = Location.all @json = Location.all.to_gmaps4rails end respond_to do |format| format.html # index.html.erb
2011 Jan 26
13
undefined method `model_name' for NilClass:Class
I am new to Ruby on Rails and have a very simple foreign key example that is driving me nuts. I am using Rails 3 under Windows Vista and have two tables: users and user_comments. user_comments.user_id should point to the user a comment is about. In my show view for user I have a link to the new method of user_comments to allow a comment to be created. This throws: Showing
2010 May 10
7
NilClass passed to partial view
Hi, I have a simple program that tries to do something really basic. First, I have a company Model : ------------------------------------- class Company < ActiveRecord::Base has_one :billingAddress, :foreign_key=>"id", :class_name=>"Address" end Then I have the address Model : -------------------------------------- class Address< ActiveRecord::Base belongs_to
2011 May 27
14
[rails] undefined method `model_name' for NilClass:Class
Never seen the error above before, code: describe "edit action" do it "edit action should render edit template" do food = Food.create(:name=>''mooo'') # Food.any_instance.stubs(:valid?).returns(true) get :edit, :id => food.id response.should render_template(:edit) end end -------------- next part
2011 Dec 15
1
problem with starting mongrel gem
Hi, I have installed mongrel gem and when i tried to start mongrel_rails start its causing me following problem mongrel_rails start ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Requiring REXML /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.10/lib/ active_support/dependencies.rb:239:in `require'': no such file to load --
2011 Jun 29
6
RSpec with Rails 3.1rc4: spec test won't recognize <%= %> (should be simple)
In my user_sessions_controller: class UserSessionsController < ApplicationController before_filter :require_no_user, :only => [:create, :new] before_filter :require_user, :only => :destroy def new @user_session = UserSession.new @message = "Hello." end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save
2005 Mar 08
1
To convert an adjacency list model into a nested set model
Dear R-help I am wondering if somebody wrote some code to convert an adjacency list model into a nested set model. In principal I want to do the same as John Celko mentioned it here with SQL: http://groups.google.co.uk/groups?hl=en&lr=lang_en&selm=8j0n05%24n31%241 %40nnrp1.deja.com Assume you have a tree structure like this Albert / \ /
2012 Jul 18
3
Undefined method error
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". It says the error is at line 1, which is "<%= form_for
2005 Nov 23
15
:conditions => ... formatting
With code like: if @params[:pnumber] =~ /\s*p?(\d+)\s*/ if student = Student.find_first(:conditions => ["pnumber like \":pnumber%\"", {:pnumber => $1}]) @borrower = student elsif emp = Employee.find_first(:condiwions => ["pnumber like \"?\"", {:pnumber => $1}]) @borrower = emp else
2006 Apr 21
1
How can i use info of two or more tables in the one form
i have a trouble with my application, because i need to load three combobox, called employes, customer, products, but i cannot to access them. i need a model for each one them? how can i access to the info of the three tables: employes, customers, products, to show in a view.. please help me... thanks -- Posted via http://www.ruby-forum.com/.
2012 Jun 13
2
Samba 64 bit compilation
Which platform? If on Solaris 10 sparc, GCC (either from Sun or sunfreeware.com) should be 64-bit by default. GCC from Sunfreeware for Solaris 10 x86 will compile 32-bit by default. For Solaris, you are better off using Sun Studio and Dmake. Actually, you are better off just using the compiled version from Oracle/Sun. On 06/13/12 02:08, prabu.murugan at emc.com wrote: > Hi, > >
2012 May 17
3
Samba compilation issue
On 05/17/12 11:15, prabu.murugan at emc.com wrote: > > Hi, > > As a security concern we are upgrading samba to 3.4.17. > > I tried all possible option to compile samba 3.4.17 on Solaris 10_U10. > But it is not going through. > > > > User requirement is to compile samba 3.4.17 to support their > application. 3.4.17 is working on Solaris 9 and Solaris 10_U5. But
2008 Oct 25
2
Update action | NoMethodError | nil.to_sym
Ok, totally no reason why I''m getting an error in this model update and no other. HELP! CONTROLLER: # GET /employees/1/edit def edit @employee = Employees.find(params[:id]) end VIEW: <h1>Edit Employee</h1> <div id="main-sub"> <%= error_messages_for :employees %> <% form_for(@employee) do |f| %> <table width="600"