I should probably also provide the controller code.
This is the parent:
class MultipleChoiceSequencesController < ApplicationController
hobo_model_controller
auto_actions :all, :except => :index
polymorphic_auto_actions_for :page, [ :index, :new, :create ]
end
The :page model is this model's parent. This is the choice controller
itself:
class MultipleChoiceChoicesController < ApplicationController
hobo_model_controller
auto_actions :write_only
auto_actions_for :multiple_choice_sequence, :create
# The default method created by
# auto_actions_for was redirecting to "/"
# (probably an edge-case bug for mutliple child associations)
#
def create_for_multiple_choice_sequence
hobo_create do
page_path = params["page_path"]
redirect_to page_path if page_path && valid?
end
end
end
I tried changing the auto_actions_for :multiple_choice_sequence here, but
making it [:create, :update] didn't help (it actually produced errors).
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/1g4m1lwAxXUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.