Displaying 20 results from an estimated 8000 matches similar to: "NoMethodError in Book#show_subjects"
2011 Apr 25
30
NoMethodError in Book
I got a following error.
NoMethodError in Book#new
Showing /home/amrit/boook/app/views/book/_form.html.erb where line #1
raised:
undefined method `model_name'' for NilClass:Class
The content of _form.html.erb file are:
<%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%=
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such
column: books.user_id: SELECT "books".* FROM "books" WHERE
("books".user_id = 4)" ,which sounds like there is no user_id in books
table.So i just installed foreigner plugin and added "
t.integer :user_id, :null => false" and
"add_foreign_key(:books, :users)" in book
2009 Sep 14
2
Set a select box with default value selected
I am relating to the book & subject example mentioned in the tutorial
mentioned here:
http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm
There is a file that goes like show_subjects.html.erb and it will list
all the books for that particular subject we''ve selected.
Suppose if there were no books to show for the subject we can ideally
show a corresponding message
2006 Jun 23
3
Yet another problem with NoMethodError in Store#display_cart
Hi everybody,
I''ve search a lot on google to help me with this one without success. I
know that some people had the same problem as I have, but there
solutions doesn''t seems to work for me.
I''m trying to do the depot example in the AWDwR book. But now I''m stock
with a problem that I can''t solve. I get this error:
<--- begin error here --->
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"
2006 Aug 14
1
NoMethodError
Hello,
When i test this code
<h1>contenu de votre panier</h1>
<table>
<%
for item in @items
product = item.product
%>
<tr>
<td><%= item.quantity %></td>
<td><%= h(product.title)%></td>
<td align="right"><%=item.unit_price %></td>
<td align="right"><%=item.unit_price * item.quantity
2008 May 09
0
NoMethodError in ClassifiedController#update
My project was working when I add new field category
It is showing the error in create form and edit form
i am sending u controller file as attechment
this is my model(category.rb) dor category file
class Category < ActiveRecord::Base
has_many :classifieds
end
and this is edit.rhtml
<h1>Editing Classified: <%= @classified.title -%></h1>
<%= form_tag :action =>
2005 Dec 27
2
NoMethodError in new scaffold
Hi All,
I created a new rails application using rails 1.0. I used "ruby
script\generate scaffold" for each of my tables. This worked on all but
2 of my tables. When I go to the new or edit action of my requests or
admins table, I get the error below.
On one table called admins I hadn''t followed the correct naming
convention and wasn''t able to edit or create
2008 Mar 23
1
Object creation when the controller is a subclass of AdminController
I''ve finally determined that the best way to handle administration of
a model that displays publicly but is administered privately is
through subclassing but I''ve run in to pathing issues (I think) when
trying to create an instance of my model.
Let''s say I have a Book, and BookController is a sublcass of
AdminController so that I can create and delete Books via an Admin
2008 Dec 11
1
help needed regaring Acts As Taggable On Steroids
Hello,
In my rails application, I have a book model.
I want to add tags. For that I have installed
acts_as_taggable_on_steroids from this link
http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
and do as the readme file.
This is my Model :
class Book < ActiveRecord::Base
acts_as_taggable
end
Here is my ApplicationHelper :
module
2012 Jan 05
4
mySQL: ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)
Hello, I am using InstantRails 2.0 on windows.
When building an app,I get this error when hit the browser(Action
ControllerException caught):
Access denied for user ''root''@''localhost'' (using password: NO)
-----------------------------------------------------------------------------------------------
The database.yml file is configured like this:
# MySQL.
2007 Jul 19
7
NoMethodError in partial driving me mad
Hello,
i simplified have a news model, a news category model and a news
controller.
my _news.rhtml partial renders a single news entry.
in my controller there are the actions show and show_category.
if the "show" action is called, a single news item is rendered through
my partial with no errors.
if the "show_category" action is called, i get a NoMethodError while
displaying
2005 Dec 20
3
Single controller to browse things in categories
First off, hi, I''m [obviously] new :O)
Please excuse my question as I''m sure it''s been answered, but I can''t
find it anywhere.
I have a table of categories:
id name
1 Foo
2 Bar
I have things which belong_to categories:
id category_id subject date
1 1 my subject 07/09/2004
and Further classifications which belong_to categories:
id category_id name
1 1 More
2020 Apr 02
3
RFC: dynamic_cast optimization in LTO
<font face="Verdana,Arial,Helvetica,sans-serif" size="2"> <span><div>Hi,<br>There was a mention of optimizing away C++ dynamic_casts in LTO in this presentation: <a href="https://www.youtube.com/watch?v=Fd3afoM3UOE&t=1306" target="_blank">https://www.youtube.com/watch?v=Fd3afoM3UOE&t=1306</a><br>I
2009 Dec 24
4
NoMethodError
Hi,
In a few words, can someone explain to me the NoMethodError. Googling
for answers will get you to something but a direct answer from experts
will give you something.
NoMethodError in Book#new
Showing app/views/book/new.html.erb where line #4 raised:
undefined method `title'' for #<Book id: nil, created_at: nil,
updated_at: nil>
Extracted source (around line #4):
1:
2019 Dec 11
5
RFC: Safe Whole Program Devirtualization Enablement
Please send any comments. As mentioned at the end I will follow up with
some patches as soon as they are cleaned up and I create some test cases.
RFC: Safe Whole Program Devirtualization Enablement
===================================================
High Level Summary
------------------
The goal of the changes described in this RFC is to support aggressive
Whole Program Devirtualization without
2006 Jun 16
8
OffRailed, and stuck in the book : (
Help, i''ve been trapped on the tracks here for a day now in the Agile w/
Rails book (latest edition) I can''t get page 115 to display.
It says:
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Extracted source (around line #3):
1: <h1> My Agile Cart</h1>
2:
2009 Oct 14
6
Reinstantiate controller during functional testing
... ok, I may be going about this the wrong way, or perhaps, a less
efficient way than is optimal, but I would like to test a little bit
of AJAX on one of my web pages. When I test this by hand, I bring up
the page which shows a select box, I select an item from the drop down
list, see another select box show up, go back to the first select box,
select a different item, and see something
2009 Sep 28
6
What is the most efficient way to split a table into 2 groups?
I have the following:
@lot = Lot.find(params[:id])
part_nums = Part.all(:conditions => ["id <> ?", @lot.part.id])
I guess I should mention that
Lot :belongs_to => :part
I was looking at the log following the execution of these two
statements and I saw something like this:
Lot Load (0.4ms) SELECT * FROM "lots" WHERE ("lots"."id" = 13)
Part
2005 Jul 29
3
More issues with Rails Book Cart tutorial.
I am presently trying to get the cart section (chapter 8.) working
and after following the instructions as carefully as I can determine
I am nonetheless getting the following errors:
URL=http://localhost:3000/store/add_to_cart/10
NameError in Store#add_to_cart
undefined local variable or method `parms'' for
#<StoreController:0x376ee60>