scambra / devise_invitable Goto Github PK
View Code? Open in Web Editor NEWAn invitation strategy for devise
License: MIT License
An invitation strategy for devise
License: MIT License
Are you planning on including this in the next release because when you embed a form into another controller it would be ideal to implement for that situation. Thanks!
When I send an invite I´d like something like this to happen:
new_user.invited_by = current_user
An Admin can create new users. Later on I´d like to restrict what the user can access trought which admin invited him.
Ignore this, just found that it's not possible in the model comments. Thanks
When an Invitation is created I want to record:
who created it: created_by
optional message: message
Therefore I'm thinking I need to generate a Invitation model with these fiends because it seems sloppy to add more fields to the users table.
So what I could use your help with is, how do I create the controller that allows me to set the invitation and record these additional fields?
Thanks
Views are not recognized in app/views/devise/invitations/
, they only work in app/views/users/invitations
and such. It would be more comfortable to nest this into devise folder in views.
I have a user model with extra fields like first_name and last_name. When a user is invited, the inviter can specify their first_name and last_name. When I follow the token from the email, none of the fields on the form are pre-populated with these columns. If I create an inherited InvitationsController and copy exactly what's in the Devise::InvitationsController, the fields are now pre-populated correctly. I have this as a work around but is this intended or is the invitations only purpose is to specify a password and confirmation? I don't like overriding your default behavior because it just creates more work in the future. Thanks for the help.
def edit
if params[:invitation_token] && self.resource = resource_class.first(:conditions => { :invitation_token => params[:invitation_token] })
render_with_scope :edit
else
set_flash_message(:alert, :invitation_token_invalid)
redirect_to after_sign_out_path_for(resource_name)
end
end
I'm getting this with Rails 2.3.8
$ script/console
Loading development environment (Rails 2.3.8)
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant':NameError: uninitialized constant Devise::Mailer
When we send an invitation, it seems that the code is unaware of the inviter.
I suggest that the user model have a virtual attribute called "inviter" which has the "current_user" available in it. The invite! method called in InvitationController's should provide an another parameter "current_user". This would be assigned to the virtual attribute inviter in the user model. This way the mailer view can also get hold of the inviter.
I'll try sending in a patch.
I installed invitable and tried to to my User Devise model ... but got an error :
Updating .gem files in vendor/cache
bundle show [gemname]
to see where a bundled gem is installed.I can add manually :invitable to User , and when creating a user from the console, I can see the record fields : invitation_token: nil, invitation_sent_at: nil
so it seems ok, but why the : error mongoid [not found] ???
Not sure if i'm blind or what but 'invited_by' is polymorphic but the migration seems to be missing invited_by_type field?
Hi,
I would like to set some roles for the people I invite. However, the roles attribute is not mass-assignable (for obvious security reasons). The attribute can be set by using "user.roles=".
How would I go about getting invitable to assign this attribute for me? I tried overriding the invitations#create, but didn't get that to work.
Could you point me in the right direction.
Thanks for your time,
Erwin
In the invite! class method, the record is saved skipping all validations. It looks like this is needed to avoid the password-required validation problem, but it seems like throwing the baby out with the bathwater as we say in England : )
In my case I've lost my checks for a well formatted email address, check that the User#role is given, etc.
InvitationsController assumes that current_user exists. This is not case when anyone could ask invitation mail, so perhaps this should be think again.
i get this everytime i login to console or start the server rails s...
/Users/myname/.rvm/gems/ruby-1.9.2-rc2/gems/devise_invitable-0.3.1/lib/devise_invitable.rb:8: warning: class variable access from toplevel
If a user is invited the user is created in the db with no password salt. Now if that user tries to sign in before accepting the invitation, you get an InvalidSalt exception.
Hello,
sorry for creating a ticket about this, however:
gem "devise", :git => "git://github.com/plataformatec/devise.git"
gem "devise_invitable", :git => "git://github.com/scambra/devise_invitable.git"
Could not find gem 'devise (~> 1.1.0)', required by 'devise_invitable', in any of the sources
If it is compatible with devise git can we get a dependencies update?
Thanks!
This is with devise 1.1.7 and devise_invitable 0.3.6. I'm getting a "NoMethodError (undefined method `invitation' for Devise::Mailer:Class)" in development mode when trying to invite someone. The trace goes like this:
undefined method `invitation' for Devise::Mailer:Class actionmailer (3.0.5) lib/action_mailer/deprecated_api.rb:74:in `method_missing' actionmailer (3.0.5) lib/action_mailer/base.rb:429:in `method_missing' devise_invitable (0.3.6) lib/devise_invitable/model.rb:39:in `send_invitation' devise_invitable (0.3.6) lib/devise_invitable/model.rb:48:in `invite!' devise_invitable (0.3.6) lib/devise_invitable/model.rb:116:in `invite!' app/controllers/adm/admins_controller.rb:12:in `create'
app/controllers/adm/admins_controller.rb:12: Admin.invite!(params[:admin])
I'm pretty lost why this is happening in development only, test and production env are working fine!?
Any chance there'll ever be a version compatible with rails 2.3?
Works with 0.9, but will not work with warden 0.10
I get the following error when trying to run devise_invitable:install:
script/rails:6: stack level too deep (SystemStackError)
Using Ruby 1.9.2-head
It would be nice if I could say post an invitation token for 50 users to be in my application's beta. And then the code only lets in 50 users.
Thanks!
Please, help me resolve problem with i18n and %{email}
missing interpolation argument in "invite to %{email}" ({:resource_name=>:user} given)
Hello, I'd like to be able to invite a user as follows:
User.invite!(:email => "[email protected]", :name => "John Doe")
But prevent the system from sending out an email invitation. Is this possible?
Hello, I'm creating a Getting Started wizard and would like to have a page for Invitations where users can enter a CSV of emails. Has anyone done this before?
How can I include the /devise/invitations/new form in my GettingStarted Controller. I tried:
<%= render 'devise/invitations/new' %>
Which errors with: <%= render 'devise/invitations/new' %>
Thanks for any tips.
I just setup a new rails project and tried sending the invite using rails console. Invitation mail got successfully delivered to my mailbox, but on clicking the link to accept invitation I get the no route error. I googled it but didn't find anything useful, so may be I am doing something wrong. Can you please help me?
I am using Rails 3.0.4, Devise 1.1.5, devise_invitable 0.3.5 and MongoID 2.0.0.rc7
Thanks
When you invite someone, click the invite link, register. Everything works fine..
If you then click that same used invite link again, it takes you to the /users/invitations signup page, giving the impression that you can join or overwrite your last signup. When you submit it does fail with the "Invitation token is invalid" which is good.
But I a better UX would probably be when clicking the invite link, if the token is invalid, redirect to the root with a flash message "Your invitation has expired .... "
Delivering invitation mail is now directly invoked from invite! however earlier there was a method called deliver_invitation for it.
I needed to queue the emails in the background and send later using delayed_jobs. I worked around it be overriding the invite! in my project, but if deliver_invitation was still around it could have been done in a better way.
Please excuse my poor English.
ru:
devise:
mailer:
invitiation:
subject: 'Приглашение'
It will be nice to add ability to see all sent by user invitations with status - accepted or not accepted
It seems that the Git version of devise no longer creates the password_salt field, which is making the installation of devise_invitable fail when running the migration. All that seems to be needed is to remove the line that changes the password_salt column, or at least making it run only when the column exists to begin with.
This is the subject line of emails when calling User.send_invitation(...).
I'm on rails 2.3.8 and devise_invitation 0.2.3
Hello, after a user accepts an invitation and signs up the flash notice "Your password was set successfully. You are now signed in." appears.
How can you customize that msg and redirect to a different URL, I would like to redirect to /gettingstarted
thanks
My app is experiencing a UX issue when invited users at some point after being invited try to sign in or register. Devise currently does not notify the user they need to click the invitation link sent via email. Devise outputs a very unhelpful msg along the lines of "user not found etc..."
Has anyone else experienced this? Any thoughts around, whenever an invited user tries to Register, Sign In or Reset their password, devise forwards them to a screen letting the user know they've been invited and gives the user the option to resend the invitation link to access the site?
Thoughts? Thanks!
Can you provide a little code snippet in the README that shows how you create and send an Invitation? The instructions on how to add to an existing project are great.
I am trying to generate the views to customize, but am unable to do so:
[jason@sourceden impress]$ script/generate devise_invitable:views
...
Couldn't find 'devise_invitable:views' generator
Could you add the ability to set the number of invites a user gets, by default.
I guess you would add an invitation_limit column to the resource table then in the Devise config file add a config.invitation_limit, where the number is how many invitations the user has left. Default is nil (meaning no limit). Then, if the config.invitation_limit is set to a number other than nil, the number would decrease every time the user sends an invitation.
I would fork and build that myself, but it is a tad beyond my abilities at this point.
Is it possible to override the InvitationsController?
I would like my DEF CREATE to respond back with JS: Something like:
def create
self.resource = resource_class.invite!(params[resource_name])
if resource.errors.empty?
#set_flash_message :notice, :send_instructions
render :js => "alert('Hello Rails');"
end
Is this possible without having to fork?
Hi,
Odd problem for me:
I need to override the authenticate_inviter! method, so per readme instructions I add to my application_controller:
def authenticate_inviter!
false # setting it false just test, will be changed to: current_user.role? :admin
end
In my understanding the override above should prevent any invitations being created. However, they still get send and saved to the db as normal.
What am I missing?
Thanks for your time,
Erwin
while I'm loving this gem I've run into one big blocker, "Email has already been taken" If a user is invited and then tries to register on their own (which is common) the unregistered/invited user can't join and receives a "Email has already been taken" error on SignUp. Very problematic.
Is there any way to handle this as is today?
My suggestion would be, that a invited used if they then try to register for an invitation that was never accepted be allowed to register. And that it either overwrite or delete their old invitation after all the paramaters are checked to be valid.
Thoughts?
If a user is invited and gets a validation error the invite token is forgotten after the form is reloaded giving them a not valid token error the next time they submit the form. This forces the user to go back to the email and re-click on the link despite the form being re-rendered.
Hi
On Rails 3.0.1, with Gemfile:
... gem 'devise', :git => 'git://github.com/plataformatec/devise.git' gem 'devise_invitable', :git => 'git://github.com/scambra/devise_invitable.git' ...
When I fill in the invitation form and hit the submit button, I get the backtrace listed below. It appears that the Devise::Mailer has "unincluded" DeviseInvitable::Mailer. If I check the Devise::Mailer ancestors at startup, I can see DeviseInvitable::Mailer. When I get around the calling invitation_instructions, it is no longer in the ancestors. I'm pretty inexperience with ruby & rails so I guess it's possible I'm doing something stupid, but I can't see where. I'm not interacting with the Devise::Mailer anywhere in my project code, as far as I can see.
vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.1/lib/action_mailer/deprecated_api.rb:74:in `method_missing' vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.1/lib/action_mailer/base.rb:427:in `method_missing' vendor/bundle/ruby/1.9.1/bundler/gems/devise_invitable-f1a3a79b94e2/lib/devise_invitable/model.rb:59:in `invite!' vendor/bundle/ruby/1.9.1/bundler/gems/devise_invitable-f1a3a79b94e2/lib/devise_invitable/model.rb:116:in `invite!' vendor/bundle/ruby/1.9.1/bundler/gems/devise_invitable-f1a3a79b94e2/app/controllers/devise/invitations_controller.rb:16:in `create' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/abstract_controller/base.rb:150:in `process_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/rendering.rb:11:in `process_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/abstract_controller/callbacks.rb:18:in `block in process_action' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/callbacks.rb:450:in `_run__330477678__process_action__446329792__callbacks' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/callbacks.rb:93:in `run_callbacks' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/abstract_controller/callbacks.rb:17:in `process_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/notifications.rb:52:in `block in instrument' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/notifications.rb:52:in `instrument' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/instrumentation.rb:29:in `process_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/rescue.rb:17:in `process_action' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in `block in process_action' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:252:in `block in perform_action_with_newrelic_trace' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/agent/method_tracer.rb:141:in `trace_execution_scoped' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:247:in `perform_action_with_newrelic_trace' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in `process_action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/abstract_controller/base.rb:119:in `process' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/abstract_controller/rendering.rb:40:in `process' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal.rb:133:in `dispatch' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/metal.rb:173:in `block in action' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:62:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:62:in `dispatch' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:27:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/routing/mapper.rb:34:in `call' vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:148:in `block in call' vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:93:in `block in recognize' vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:75:in `optimized_each' vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/code_generation.rb:92:in `recognize' vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.13/lib/rack/mount/route_set.rb:139:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:492:in `call' vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-2.13.3/lib/new_relic/rack/developer_mode.rb:20:in `call' vendor/bundle/ruby/1.9.1/gems/hoptoad_notifier-2.3.12/lib/hoptoad_notifier/rack.rb:27:in `call' vendor/bundle/ruby/1.9.1/gems/haml-3.0.23/lib/sass/plugin/rack.rb:41:in `call' vendor/bundle/ruby/1.9.1/gems/warden-1.0.1/lib/warden/manager.rb:35:in `block in call' vendor/bundle/ruby/1.9.1/gems/warden-1.0.1/lib/warden/manager.rb:34:in `catch' vendor/bundle/ruby/1.9.1/gems/warden-1.0.1/lib/warden/manager.rb:34:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/head.rb:14:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/params_parser.rb:21:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/flash.rb:182:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/cookies.rb:287:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/callbacks.rb:415:in `_run_call_callbacks' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/callbacks.rb:44:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/sendfile.rb:107:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/remote_ip.rb:48:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/show_exceptions.rb:46:in `call' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/rack/logger.rb:13:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/runtime.rb:17:in `call' vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11:in `block in call' :10:in `synchronize' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/lock.rb:11:in `call' vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/static.rb:30:in `call' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:168:in `call' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:77:in `method_missing' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/rack/log_tailer.rb:14:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/chunked.rb:15:in `call' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:76:in `block in pre_process' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `catch' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `pre_process' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:57:in `process' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:42:in `receive_data' vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start' vendor/bundle/ruby/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:in `start' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/handler/thin.rb:14:in `run' vendor/bundle/ruby/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:213:in `start' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/commands/server.rb:65:in `start' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/commands.rb:30:in `block in ' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/commands.rb:27:in `tap' vendor/bundle/ruby/1.9.1/gems/railties-3.0.1/lib/rails/commands.rb:27:in `' script/rails:6:in `require' script/rails:6:in `'
Also: if I stop and start Thin, then refresh the web page currently showing the backtrace (http://0.0.0.0:3000/users/invitation), then the invitation works and the email is sent with the correct instructions inside. So it looks like everything is loaded correctly on the first request, but subsequent requests use a "redefined" Devise::Mailer.
Any ideas?
Cheers
Lee
Can you please point me to an example of how to implement delayed_job with devise_invitable? I cannot figure out where to call handle_asynchronously :invite!
.
Thanks!
I am using cucumber with webrat and:
In one step (Step 1), I call User.invite!. Just after this, other step runs (Step 2) trying to create an User (in fact, I am using machinist. So, it is calling User.make!).
BUT, Step 2 is not really creating the User (it raises no error, just create a user, set id, etc. but it is not really saved at DB).
If I run Step 2 before Step 1, everything goes ok, ponies and rainbows!
Will investigate more about it. Any ideas about what can be happening?
Not only that but also...
rails generate devise_invitable User
Could not find generator devise_invitable.
This is on rails 3.0.0 and the following from gemfile.lock
devise (1.1.2)
bcrypt-ruby (> 2.1.2)> 0.10.7)
warden (
devise_invitable (0.3.2)
devise (~> 1.1.0)
It was installed with "gem install devise_invitable" and also "bundle install". rails generate shows neither devise_invitable nor devise_invitable:install as available tasks. devise_invitable:views is available and generates the templates.
It look like they updated jose updated the set_flash_message API back in July
heartcombo/devise@0aa41d6#diff-3
Thanks for this gem, saved me some time!
Out of the box, the Invitaions#create is trying to send a (now missing) 3rd param
https://github.com/scambra/devise_invitable/blob/master/app/controllers/devise/invitations_controller.rb#L19
Was gonna plug this one up myself, but I can't get the test to run. All I did was add set_flash_message as a private method in my invitation controller to beat out devise's. Not clean - maybe you can integrate it better.
I noticed an issue when setting a bad password (ie too short)... it catches the error perfectly but on redirect the user back to the form the token is lost from the form and is no longer able to register unless they go back to the email.
Morning all,
I am using Rails 3.0.5, with the following devise related gems:
gem 'devise', '1.2.rc'
gem 'devise_invitable', '0.4.rc4'
When I submit the form to invite the new user, I have the following error
undefined method `invitation_instructions' for Devise::Mailer:Class
Just to clarify, I have do have the following file in my views/devise/mailer:
invitation_instructions.html.haml
And this is my Full Trace:
actionmailer (3.0.5) lib/action_mailer/deprecated_api.rb:74:in `method_missing' actionmailer (3.0.5) lib/action_mailer/base.rb:429:in `method_missing' devise_invitable (0.4.rc4) lib/devise_invitable/model.rb:87:in `deliver_invitation' devise_invitable (0.4.rc4) lib/devise_invitable/model.rb:62:in `invite!' devise_invitable (0.4.rc4) lib/devise_invitable/model.rb:141:in `invite!' devise_invitable (0.4.rc4) app/controllers/devise/invitations_controller.rb:17:in `create' actionpack (3.0.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action' actionpack (3.0.5) lib/abstract_controller/base.rb:150:in `process_action' actionpack (3.0.5) lib/action_controller/metal/rendering.rb:11:in `process_action' actionpack (3.0.5) lib/abstract_controller/callbacks.rb:18:in `block in process_action' activesupport (3.0.5) lib/active_support/callbacks.rb:450:in `_run__1118674731856297132__process_action__2368427774484213763__callbacks' activesupport (3.0.5) lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks' activesupport (3.0.5) lib/active_support/callbacks.rb:93:in `run_callbacks' actionpack (3.0.5) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.0.5) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' activesupport (3.0.5) lib/active_support/notifications.rb:52:in `block in instrument' activesupport (3.0.5) lib/active_support/notifications/instrumenter.rb:21:in `instrument' activesupport (3.0.5) lib/active_support/notifications.rb:52:in `instrument' actionpack (3.0.5) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.0.5) lib/action_controller/metal/rescue.rb:17:in `process_action' actionpack (3.0.5) lib/abstract_controller/base.rb:119:in `process' actionpack (3.0.5) lib/abstract_controller/rendering.rb:41:in `process' actionpack (3.0.5) lib/action_controller/metal.rb:138:in `dispatch' actionpack (3.0.5) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.0.5) lib/action_controller/metal.rb:178:in `block in action' actionpack (3.0.5) lib/action_dispatch/routing/route_set.rb:62:in `call' actionpack (3.0.5) lib/action_dispatch/routing/route_set.rb:62:in `dispatch' actionpack (3.0.5) lib/action_dispatch/routing/route_set.rb:27:in `call' actionpack (3.0.5) lib/action_dispatch/routing/mapper.rb:39:in `call' rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in `block in call' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:93:in `block in recognize' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:89:in `optimized_each' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:92:in `recognize' rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in `call' actionpack (3.0.5) lib/action_dispatch/routing/route_set.rb:492:in `call' haml (3.0.25) lib/sass/plugin/rack.rb:41:in `call' warden (1.0.3) lib/warden/manager.rb:35:in `block in call' warden (1.0.3) lib/warden/manager.rb:34:in `catch' warden (1.0.3) lib/warden/manager.rb:34:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/head.rb:14:in `call' rack (1.2.2) lib/rack/methodoverride.rb:24:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/flash.rb:182:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/cookies.rb:302:in `call' activerecord (3.0.5) lib/active_record/query_cache.rb:32:in `block in call' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache' activerecord (3.0.5) lib/active_record/query_cache.rb:12:in `cache' activerecord (3.0.5) lib/active_record/query_cache.rb:31:in `call' activerecord (3.0.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call' activesupport (3.0.5) lib/active_support/callbacks.rb:415:in `_run_call_callbacks' actionpack (3.0.5) lib/action_dispatch/middleware/callbacks.rb:44:in `call' rack (1.2.2) lib/rack/sendfile.rb:107:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/remote_ip.rb:48:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call' railties (3.0.5) lib/rails/rack/logger.rb:13:in `call' rack (1.2.2) lib/rack/runtime.rb:17:in `call' activesupport (3.0.5) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.2.2) lib/rack/lock.rb:11:in `block in call' :10:in `synchronize' rack (1.2.2) lib/rack/lock.rb:11:in `call' actionpack (3.0.5) lib/action_dispatch/middleware/static.rb:30:in `call' railties (3.0.5) lib/rails/application.rb:168:in `call' railties (3.0.5) lib/rails/application.rb:77:in `method_missing' railties (3.0.5) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.2.2) lib/rack/content_length.rb:13:in `call' rack (1.2.2) lib/rack/handler/webrick.rb:52:in `service' /Users/Daren/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /Users/Daren/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /Users/Daren/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Any help would be very much appreciated!
Cheers,
D.
I just added the gem to my Gemfile now (Rails 3.0.3). I ran bundle install
and then rails generate devise_invitable:install
. I see:
/Users/james/.rvm/gems/ruby-1.9.2-p0/gems/devise_invitable-0.1.3/lib/devise_invitable.rb:4: warning: class variable access from toplevel
/Users/james/.rvm/gems/ruby-1.9.2-p0/gems/devise_invitable-0.1.3/lib/devise_invitable/mailer.rb:9:in `<top (required)>': uninitialized constant DeviseMailer (NameError)
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/devise_invitable-0.1.3/lib/devise_invitable.rb:11:in `<top (required)>'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from /Users/james/Sites/code/rails/mtales.com/config/application.rb:7:in `<top (required)>'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands.rb:15:in `require'
from /Users/james/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands.rb:15:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any idea when this module will support both?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.