RailsCasts Pro episodes are now free!

Learn more or hide this

Frederic ZINGG's Profile

GitHub User: fzingg

Comments by Frederic ZINGG

Avatar

I found out, it's because in application.rb :
config.assets.paths << "#{Rails.root}/public"

Avatar

I just tried on local. No link with capistrano.
But the problem still remains.

From scratch, first compilation, it generates 3 levels of assets directory. /public/assets/assets/assets

Avatar

Problem with assets:precompile
Thanks to ryan I can deploy my app with capistrano now but evertime come the assets:precompile command it takes longer and longer.

In fact assets subdirectories are added everytime :

app/public/assets/assets/assets/assets/assets etc .....

It looks like it compiles all assets recursively.
I thought it because I have : config.assets.precompile += ['*.js', '*.css'] but even if without the problem shows up.

Any idea ?

Avatar

Problem with logout function and current_user value.

When calls logout, only resets session (reset_session) but not resets current_user to nil.

So when using logged_in? function after logout, it returns true because logged_in? tests current_user value.

Avatar

Ok, I found the problem.

It's a confusion between :activation_code and :activation_token

@noam ben ari : I think you can update your wikis tutorial.

By default :activation_token and :activation_token_expires_at are created during the migration.

But after, in your tutorial you write user.activation_code instead of user.activation_token in *user_mailer.rb - activation_needed_email

Another little thing in Sorcery - Reset password tutorial, you forgot :

ruby
*# app/views/password_resets/edit.html.erb*
<h1>Forgot Password?</h1>
<%= render 'form' %>

Thank you very much for this amazing gem.

Avatar

Need help for user_activation module.

I followed Sorcery's wikis tutorial but I don't know how to fix this problem. Everything works with these submodules :
:http_basic_auth, :remember_me, :reset_password

but with :user_activation :

NoMethodError (undefined methodactivation_code' for #User:0xacda7bc):
app/mailers/user_mailer.rb:22:in activation_needed_email'
app/controllers/users_controller.rb:29:in
create'`

Environnement : Rails 3.1.0 - Sorcery 0.6.1

Thanks.