0
votes

I'm new to rails and i'm trying to do lazy registration found here http://blog.bignerdranch.com/1679-lazy-user-registration-for-rails-apps/ And i have some errors:

  • uninitialized constant AnonymousUser::ACCESSIBLE_ATTRS It's in my anonymous_user model

  • after adding

    RetrospectionApp::Application.routes.draw do devise_for :users, controllers: {registrations: 'registrations'} resources :posts, path: '/' root to: 'posts#index' end

    I see error

    uninitialized constant RetrospectionApp

I don't understand this route section and model. Can someone explain a bit and show solution?

1

1 Answers

2
votes

I am pretty sure you are getting:

uninitialized constant RetrospectionApp

Because your app is not called that way. When creating your routes, you need to write the name of your app instead of RetrospectionApp

And I believe you are getting this:

uninitialized constant AnonymousUser::ACCESSIBLE_ATTRS

Because ACCESSIBLE_ATTRS is not defined. You need to tell your class what that constant is, for example by doing:

ACCESSIBLE_ATTRS = [:name, :email]

Which would say that the attributes :name and :email are accessible via mass assignment.