[Radiant] Problem with 'commentable';
was "Re: RadiantCMS, Maple Leaf Web Project"
Sean Cribbs
seancribbs at gmail.com
Sat Oct 28 08:27:49 CDT 2006
Le,
The current, correct way is to install it as a plugin:
$ ruby script/plugin install
http://seancribbs.com/svn/rails/plugins/comments_behaviors
I don't think that's the problem, though. It seems to be happening on
the "children" association. How did you set up your database?
Sean
le colibri wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 28-okt-2006, at 13:47, Sean Cribbs wrote:
>
>
>> <shameless self promotion>
>> It has that already, albeit a somewhat kludgy implementation.
>> Check out Commentable on the wiki under ThirdPartyBehaviors.
>> </shameless self promotion>
>>
>> Sean Cribbs
>> seancribbs.com
>>
>>
>
>
> Sean (or anyone),
>
> I'm currently testing the commentable behavior. I added the files to
> the app/behaviors dir. Although the comment form appears as it
> should in an article page, but when I submit a comment I receive the
> below error (my apologies for the enormous amount of text, but I
> didn't which part you'd need). The articles are set to 'commentable',
> the snippet was made and inserted in the layout with <r:snippet
> name="comments" />. I just working my way through "Programming Ruby"
> and "Agile web development ..." so I'm quite new to Ruby (on Rails)
> and probably missing something simple...
>
> +++++++++++++++++++++++++++++++++++++
> ActiveRecord::RecordInvalid in SiteController#show_page
>
> Validation failed: Status must be a number, Status must be a number
>
> RAILS_ROOT: script/../config/..
> Application Trace | Framework Trace | Full Trace
>
> vendor/rails/activerecord/lib/active_record/validations.rb:748:in
> `save!'
> vendor/rails/activerecord/lib/active_record/validations.rb:711:in
> `create!'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `send'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `method_missing'
> vendor/rails/activerecord/lib/active_record/base.rb:873:in `with_scope'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:92:in `method_missing'
> app/behaviors/comments_util.rb:23:in `create_comment_in'
> app/behaviors/commentable_behavior.rb:34:in `process'
> #{RAILS_ROOT}/lib/advanced_delegation.rb:10:in `send'
> #{RAILS_ROOT}/lib/advanced_delegation.rb:10:in `process'
> app/controllers/site_controller.rb:36:in `show_uncached_page'
> app/controllers/site_controller.rb:22:in `show_page'
>
> vendor/rails/activerecord/lib/active_record/validations.rb:748:in
> `save!'
> vendor/rails/activerecord/lib/active_record/validations.rb:711:in
> `create!'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `send'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `method_missing'
> vendor/rails/activerecord/lib/active_record/base.rb:873:in `with_scope'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:92:in `method_missing'
> vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send'
> vendor/rails/actionpack/lib/action_controller/base.rb:941:in
> `perform_action_without_filters'
> vendor/rails/actionpack/lib/action_controller/filters.rb:368:in
> `perform_action_without_benchmark'
> vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
> vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
> `perform_action'
> vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send'
> vendor/rails/actionpack/lib/action_controller/base.rb:408:in
> `process_without_filters'
> vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
> `process_without_session_management_support'
> vendor/rails/actionpack/lib/action_controller/session_management.rb:
> 117:in `process'
> vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
> vendor/rails/railties/lib/webrick_server.rb:115:in `handle_dispatch'
> vendor/rails/railties/lib/webrick_server.rb:81:in `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
> /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
> /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
> vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch'
> vendor/rails/railties/lib/commands/servers/webrick.rb:59
> vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
> `require'
> vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
> `require'
> vendor/rails/railties/lib/commands/server.rb:30
> script/server:3:in `require'
> script/server:3
>
> vendor/rails/activerecord/lib/active_record/validations.rb:748:in
> `save!'
> vendor/rails/activerecord/lib/active_record/validations.rb:711:in
> `create!'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `send'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:102:in `method_missing'
> vendor/rails/activerecord/lib/active_record/base.rb:873:in `with_scope'
> vendor/rails/activerecord/lib/active_record/associations/
> has_many_association.rb:92:in `method_missing'
> app/behaviors/comments_util.rb:23:in `create_comment_in'
> app/behaviors/commentable_behavior.rb:34:in `process'
> #{RAILS_ROOT}/lib/advanced_delegation.rb:10:in `send'
> #{RAILS_ROOT}/lib/advanced_delegation.rb:10:in `process'
> app/controllers/site_controller.rb:36:in `show_uncached_page'
> app/controllers/site_controller.rb:22:in `show_page'
> vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send'
> vendor/rails/actionpack/lib/action_controller/base.rb:941:in
> `perform_action_without_filters'
> vendor/rails/actionpack/lib/action_controller/filters.rb:368:in
> `perform_action_without_benchmark'
> vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
> vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
> `perform_action'
> vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send'
> vendor/rails/actionpack/lib/action_controller/base.rb:408:in
> `process_without_filters'
> vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
> `process_without_session_management_support'
> vendor/rails/actionpack/lib/action_controller/session_management.rb:
> 117:in `process'
> vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
> vendor/rails/railties/lib/webrick_server.rb:115:in `handle_dispatch'
> vendor/rails/railties/lib/webrick_server.rb:81:in `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
> /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
> /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
> vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch'
> vendor/rails/railties/lib/commands/servers/webrick.rb:59
> vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
> `require'
> vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
> `require'
> vendor/rails/railties/lib/commands/server.rb:30
> script/server:3:in `require'
> script/server:3
>
> Request
>
> Parameters: {"name"=>"robert", "title"=>"comment", "body"=>"this is a
> comment", "url"=>["articles", "2006", "06", "09", "first-post"]}
>
> Show session dump
>
> - - ---
>
> Response
> Headers: {"cookie"=>[]}
> +++++++++++++++++++++++++++++++++++++
>
>
> Thanks,
>
> Robert.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iD8DBQFFQ1AM8/wfD/SBQNsRAqbzAKCp60W2WK0kOspzUZlItdcPu2RPhwCgs0y6
> HBkm5bH4de/a/EbPdoI3AOg=
> =2tK1
> -----END PGP SIGNATURE-----
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20061028/a75b5fa6/attachment.html
More information about the Radiant
mailing list