No action responded to record

When I click on “record” I get:

Unknown action

No action responded to record
http://localhost:3000/feeds/record

I’m going by the tutorial at <http://developer.apple.com/tools/
rubyonrails.html> and am adapting it to my project; all code at <http://
strawr.googlecode.com/svn/>.

I added a “record” method to feeds_controller.rb which corresponds with
feed/show.rhtml, so I’m unclear as to what the error message the browser
gives means.

thanks,

Thufir

On 18 Dec 2007, at 08:35, Thufir wrote:

I added a “record” method to feeds_controller.rb which corresponds
with
feed/show.rhtml, so I’m unclear as to what the error message the
browser
gives means.

No you haven’t :slight_smile:
What you’ve done is
class FeedsController

end

def record

end

Fred

On Tue, 18 Dec 2007 08:54:26 +0000, Frederick C. wrote:

No you haven’t
What you’ve done is
class FeedsController

I don’t understand what you’re getting at. The file name is
“feeds_controller.rb”, but, yes, it’s class FeedsController. Yes, the
name of the file and the class name are related. Still, I don’t get the
significance of your observation. Nor, really, what you’ve observed.

What I want is something similar to the screenshot at <http://
code.google.com/p/expenses/downloads/list>, albeit for a many-to-many.

thanks,

Thufir

On 19 Dec 2007, at 09:08, Thufir wrote:

the
significance of your observation. Nor, really, what you’ve observed.

What I want is something similar to the screenshot at <http://
code.google.com/p/expenses/downloads/list>, albeit for a many-to-many.
You’ve done
class FeedsController

end

def record
end

If you want record to be an action on feeds controller, the def record
bit needs to be inside the class, not outside (which means that the
methods end up as private methods on Object)

Fred

On Wed, 19 Dec 2007 09:43:57 +0000, Frederick C. wrote:

If you want record to be an action on feeds controller, the def record
bit needs to be inside the class, not outside (which means that the
methods end up as private methods on Object)

Oh, I feel a bit silly; thanks!

I’m going to look at this later, but when I click on the submit
(record!)
button the result is:

ActiveRecord::RecordNotFound in FeedsController#record

Couldn’t find Category without an ID

RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/
base.rb:1012:in find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/ base.rb:419:infind’
/home/thufir/Desktop/strawr/app/controllers/feeds_controller.rb:54:in
`record’

/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/
base.rb:1012:in find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/ base.rb:419:infind’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
base.rb:1101:in send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:1101:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
filters.rb:696:in call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ filters.rb:688:inperform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ rescue.rb:83:inperform_action’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
base.rb:435:in send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:435:inprocess_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
filters.rb:684:in process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ session_management.rb:114:inprocess’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
base.rb:334:in process' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/dispatcher.rb:41:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:113:in
handle_dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:79:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart’
/usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:63:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/webrick.rb:59 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/server.rb:39
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/
base.rb:1012:in find_from_ids' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/ base.rb:419:infind’
/home/thufir/Desktop/strawr/app/controllers/feeds_controller.rb:54:in
record' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:1101:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
base.rb:1101:in perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ filters.rb:696:incall_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
filters.rb:688:in perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ benchmarking.rb:66:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ benchmarking.rb:66:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
rescue.rb:83:in perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:435:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
base.rb:435:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ filters.rb:684:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/
session_management.rb:114:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action_controller/ base.rb:334:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/dispatcher.rb:41:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:113:inhandle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:79:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/webrick_server.rb:63:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/webrick.rb:59
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:342:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in require' /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/server.rb:39 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’
script/server:3

Request

Parameters: {“category”=>{“category”=>“category4”}, “commit”=>“Record!”}

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

thanks,

Thufir

On Dec 19, 7:55 pm, Thufir [email protected] wrote:

ActiveRecord::RecordNotFound in FeedsController#record

Couldn’t find Category without an ID

This should be obvious. You’re doing Category.find(params[:id]), but
there is no :id parameter in your form.

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs