Hi,
I want to have a condition for my transition if debugmode is set for
the (acting-user in order to display the transition-button or not -
and even to restrict access to it)
When I take available_to "User" I can see the transition button. When
I try "User if User.debugmode" I don't see it. Acting_user don't
work, too.
How can I solve this ?
( I tried several things, but nothing worked well)
Thanks,
Karsten
my Contact-Transition:
transition :chooseuplineback, { :ready
=> :missingUpline }, :available_to => "User if User.debugmode"
my user-model:
class User < ActiveRecord::Base
hobo_user_model # Don't put anything above this
fields do
email_address :email_address, :unique, :name => true, :login =>
true
administrator :boolean, :default => false
firstname :string
lastname :string
debugmode :boolean, :default => false
timestamps
end
has_many :successes
has_many :contacts, :class_name => "Contact", :through => :successes
++++++++++++
my contact-model:
class Contact < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
companyname :string
lastname :string
firstname :string
email :email_address, :required
...
end
has_many :successes
has_many :users, :class_name => "User", :through => :successes
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
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.