You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created MVC using scaffold name subjects
I am receiving this error:
Started POST "/subjects" for 127.0.0.1 at 2014-06-17 15:00:06 +0100
Processing by SubjectsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"dASWl4E7igoFk8UQdB9QUQw4ORq+xwdx2+aVzBYG0ho=", "subject"=>{"name"=>"test", "description"=>"test"}, "commit"=>"Create Subject"}
User Load (0.3ms) SELECT users.* FROM users WHERE users.id = 2 LIMIT 1
Actor Load (0.2ms) SELECT actors.* FROM actors WHERE actors.id = 2 LIMIT 1
ActivityObject Load (0.2ms) SELECT activity_objects.* FROM activity_objects WHERE activity_objects.id = 9 LIMIT 1
CACHE (0.0ms) SELECT actors.* FROM actors WHERE actors.id = 2 LIMIT 1
(0.2ms) BEGIN
(0.2ms) SELECT relations.id FROM relations INNER JOIN activity_object_audiences ON relations.id = activity_object_audiences.relation_id WHERE activity_object_audiences.activity_object_id IS NULL
(0.2ms) ROLLBACK
Completed 500 Internal Server Error in 104ms
NoMethodError (undefined method relations' for nil:NilClass): app/models/activity_object.rb:274:inallowed_relations'
app/controllers/subjects_controller.rb:47:in block in create' app/controllers/subjects_controller.rb:46:increate'
I am trying to create new activity object as i followed below tutorial:
https://github.com/ging/social_stream/wiki/How-to-add-new-activity-objects
I created MVC using scaffold name subjects
I am receiving this error:
Started POST "/subjects" for 127.0.0.1 at 2014-06-17 15:00:06 +0100
Processing by SubjectsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"dASWl4E7igoFk8UQdB9QUQw4ORq+xwdx2+aVzBYG0ho=", "subject"=>{"name"=>"test", "description"=>"test"}, "commit"=>"Create Subject"}
User Load (0.3ms) SELECT
users
.* FROMusers
WHEREusers
.id
= 2 LIMIT 1Actor Load (0.2ms) SELECT
actors
.* FROMactors
WHEREactors
.id
= 2 LIMIT 1ActivityObject Load (0.2ms) SELECT
activity_objects
.* FROMactivity_objects
WHEREactivity_objects
.id
= 9 LIMIT 1CACHE (0.0ms) SELECT
actors
.* FROMactors
WHEREactors
.id
= 2 LIMIT 1(0.2ms) BEGIN
(0.2ms) SELECT
relations
.id FROMrelations
INNER JOINactivity_object_audiences
ONrelations
.id
=activity_object_audiences
.relation_id
WHEREactivity_object_audiences
.activity_object_id
IS NULL(0.2ms) ROLLBACK
Completed 500 Internal Server Error in 104ms
NoMethodError (undefined method
relations' for nil:NilClass): app/models/activity_object.rb:274:in
allowed_relations'app/controllers/subjects_controller.rb:47:in
block in create' app/controllers/subjects_controller.rb:46:in
create'Rendered /Users/edudoc/.rvm/gems/ruby-1.9.3-p547/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms)
Rendered /Users/edudoc/.rvm/gems/ruby-1.9.3-p547/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /Users/edudoc/.rvm/gems/ruby-1.9.3-p547/gems/actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (10.6ms)
Please help?
Thanks,
Yasir Hashmi
The text was updated successfully, but these errors were encountered: