Displaying 8 results from an estimated 8 matches for "books_control".
2008 Dec 20
4
uninitialized constant BooksController::Books
hi new to rails ...
wat does it means...
uninitialized constant BooksController::Books
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
`const_missing''
app/controllers/books_controller.rb:5:in `index''
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA...
2006 Jan 31
3
Lost in routing
I''m trying to create a modules based system where my controllers are
all under modules. So the structure looks something like:
app/
controllers/
message/
news_controller.rb
email_controller.rb
library
books_controller.rb
pictures_controller.rb
home_page_controller.rb
Each of those controller has it''s own view, and there''s a central
application.rhtml for the layout. The layout has in it links to each
of the controllers using the form:
url_for(:controller => ''...
2006 Dec 24
6
What do you think of this controller spec?
...and_correct_user creates two
specifications: one for when the user isn''t logged in, and one when
the user is logged in but requests someone else''s book. do_request
automatically calls do_get/post/put/delete depending on what''s
implemented.
Here''s all the code:
books_controller.rb: http://pastie.caboo.se/29469
books_controller_spec.rb: http://pastie.caboo.se/29470
spec_helper.rb: http://pastie.caboo.se/29471
The specs just feel somewhat unwieldy to me...maybe it''s because the
controller code is very simple and elegant, and the spec looks big and
bloated in co...
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
2009 May 27
4
Scaffolding Results Format
...s/books.rhtml.erb, and
books/index.rhtml.erb but can only achieve this result:
Book One
Book One Abstract
Show Edit Destroy
Book Two
Book Two Abstract
Show Edit Destroy
Book Three
Booth Three Abstract
Show Edit Destroy
------------------------------------------------
Am I missing something in books_controller.rb? Thanks for your help!
--
Posted via http://www.ruby-forum.com/.
2006 Feb 25
0
neverending i2/lighttpd problems
...169:in `validate_find_options''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.
rb:1164:in `extract_options_from_args!''
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.
rb:379:in `find''
/app/controllers/books_controller.rb:7:in `premiere''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/bas
e.rb:853:in `perform_action_without_filters''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/fil
ters.rb:332:in `perform_action_without_benchmark...
2010 Sep 21
25
Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
Hello, I''m working to install the acts_as_commentable plugin on my
Rails 3 app.
After adding "acts_as_commentable" to my book model, I then added a
comment form on my book show view:
<% form_for(@comment) do|f| %>
<%= f.hidden_field :book_id %>
<%= f.label :comment %><br />
<%= f.text_area :comment %>
<%= f.submit "Post
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><%=