Just for others who may come across a similar issue - I regenerated a new
app under Hobo 1.3RC and compared the User.rb model file to the old one.
Here's what I found:
OLD:
# This gives admin rights to the first sign-up.
# Just remove it if you don't want that
before_create { |user| user.administrator = true if !Rails.env.test? &&
count == 0 }
NEW:
# This gives admin rights and an :active state to the first sign-up.
# Just remove it if you don't want that
before_create do |user|
if !Rails.env.test? && user.class.count == 0
user.administrator = true
user.state = "active"
end
end
It looks like the primary difference is user.count is no longer a valid
method - you have to call it on user.class.count to get the same effect.
Just an FYI for others.
If someone knows of an easy way to see the major changes made between Hobo
1.0.3 and Hobo 1.3RC please speak up.
Thanks,
Henry
--
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.