Hi folks!
In a lifecycle I declare a transition
transition :add_to_basket, {:active => :active}, :available_to => :all
> do
> product = Product.where(id: self).first
> acting_user.basket.add_product(product)
> end
and I customize the flash in the controller
def do_add_to_basket
> do_transition_action :add_to_basket do
> flash[:success] = "Product was added successfully."
> flash[:notice] = "Product was added successfully."
end
> end
The success comes up, the notice not, it's overridden by
hobo/hobo/lib/hobo/controller/model.rb line 672
> flash_notice
> (ht(:"#{@this.class.to_s.underscore}.messages.update.success",
> :default=>["Changes to the #{@this.class.model_name.human} were saved"]))
I placed debugger in both location, and yes, I am to early in my controller.
Any idea how to save my notice without patching hobo? (or changing the
flash tag in DRYML on that page?)
Greetings from icy Vienna,
Stefan
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.