This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 2d24dae056f4d2b68c69429ed4395cdd8b02efb2
tree 28aae697675b9ba0eafaf664cd966d367bc34772
parent cff7cbca33d3d1c10f219a7628539712e62bda93
tree 28aae697675b9ba0eafaf664cd966d367bc34772
parent cff7cbca33d3d1c10f219a7628539712e62bda93
... |
... |
|
... |
... |
|
... |
... |
|






Comments
The init.rb file misses then a:
require File.dirname(FILE) + ’/lib/authorization/aasm_roles’
White the aasm gem, I guess the generator should write
find_by_login_and_state(login, ‘active’)
instead of find_by_login
and add a require ‘aasm’ to the model if—aasm option is set
acts_as_dyslexic : with the aasm gem…
1. aasm_roles isn’t included by the model not required by the init.rb
2. Your right, I need to adjust it for find_by_state if aasm.
3. I don’t require it in the model because I assume you vendored aasm, or require it in the init.
4. ?
1. So what if—aasm is set ?
3. Ok. It would be good then to add it in the README. Note also that the acts_as_state_machine is only available in the former SVN trunk. The rubyst github account has updated it.
4. 2 sodas please
config.gem “rubyist-aasm”, :lib => “aasm”, :source => “http://gems.github.com” in your config initializer for Rails 2.1.
Oh another thing in the StatefulRolesInstanceMethods: the do_activate instance method isn’t called upon the activate! , I don’t understand why. Calling user.do_activate works of course.
Where is the bug tracker for restful_authentication? This code doesn’t work properly on Rails 2.1. The make_activation_code fires twice when you create a new user. The first time, the record is a new record and the activation code is set. The second time, the record has already been saved and the activation code is RESET. Thus the validation email contains the wrong validation code. I have a sample app at DrMark/skeleton if anyone wants to take a look. Also, I fixed it (temporarily) by adding a check for new_record? to the make_activation_code function.
jerome,
For item #2 the stateful option wraps the find in a find_in_state so it does check the state of the user.
Issues:
1. When User is created the record is properly updated from ‘passive’ to ‘pending’ BUT the “make_activation_code is not called as expected given => :make_activation_code.” I had to put a before_filter in my User class to call “make_activation_code” to get things to work.
2. Same problem when moving from ‘pending’ to ‘active’. The state is changed when user.activate! is called … but the “do_activate” method is not called.
What gives? Am I missing something???
Thanks
Whenever you are trying to make the activation code try removing the enter command and pasting this in:
aasm_event :register, :success => :make_activation_code do
If you do it on the event block, it appears to fire the method correctly. I found this in the rspec tests of the aasm code. You should take a look for more examples.