RailsCasts Pro episodes are now free!

Learn more or hide this

Remington's Profile

GitHub User: spletta

Site: about.me/rsplett

Comments by Remington

Avatar

maybe the search path is not being set correctly??

Avatar

I'm running into this error, but I want to make this work without using apartment for now. any ideas?

Avatar

nm,

it was because of the non-restful reset link in the mail template.

Because I'm using multi-tenancy, and locales this is what my password_reset method must look like:

ruby
def password_reset(user, account)
  @user = user
  @account = account
  @reset_url = "https://#{account.subdomain}.notdienstapp.com/password_resets/#{user.password_reset_token}/edit"
  mail :to => user.email, :subject => "Password Reset"
end
Avatar

I'm missing something trivial here.

ruby
No route matches {:action=>"edit", :controller=>"password_resets", :locale=>"uI1CmPo8Le5HoO6BTwtlzQ"}

but I want to see the reset_token parameter here don't I?

Avatar

I am also struggling with how to administrate a multi tenant app, and have not found much info about this elsewhere.

I'm not sure, but maybe creating an admin user:

  1. at the same time a new tenant/user is created
  2. and only if a admin user does not already exist

would suffice?

Not sure how to do this though.. searching...

Avatar

once again very useful Ryan, thank you!

Avatar

Hi Ryan, great episode.. thank you.