Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Milia app isn't passing a tenant param? #58

Closed
tgmerritt opened this issue Apr 19, 2015 · 9 comments
Closed

Sample Milia app isn't passing a tenant param? #58

tgmerritt opened this issue Apr 19, 2015 · 9 comments

Comments

@tgmerritt
Copy link

I followed the sample app with Rails 4.2 and Ruby 2.1.5 and when I get to the signup page and submit I see the following stack trace in the error.

There is no tenant param being passed, and it's apparently required. I made sure I didn't miss a step, it's a brand new database with nothing in it, it's a brand new app without any modifications to the step-by-step instructions other than what's mentioned above with Ruby and Rails.

Any advice?

11:24:29 web.1  | Processing by Milia::RegistrationsController#create as HTML
11:24:29 web.1  |   Parameters: {"utf8"=>"✓", "authenticity_token"=>"ReCQQiaS3UchSGJRxf1BjLzi84wjGUoq6VFdIzYWgWmD5NyYFXFtteqMoSLA0/0GNMLwRth3+qLguBv3b50Byw==", "user"=>{"email"=>"tgmerritt@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
11:24:29 web.1  | Completed 400 Bad Request in 2ms (ActiveRecord: 0.0ms)
11:24:29 web.1  |
11:24:29 web.1  | ActionController::ParameterMissing (param is missing or the value is empty: tenant):

@jekuno
Copy link
Owner

jekuno commented Jan 29, 2017

Do you still have any questions regarding this issue? If you solved it feel free to share your insights. If not so please give it a try with the up to date Rails 5 branch https://github.com/jekuno/milia/tree/rails5-support.

@jekuno
Copy link
Owner

jekuno commented Jan 29, 2017

You need to provide a view for organizational signups (which contain form fields for the new tenant). Have a look at an example in the README at https://github.com/jekuno/milia/blob/master/README_DETAILS.md#view-for-organizer-sign-ups.

@jekuno
Copy link
Owner

jekuno commented Jan 29, 2017

Also check the instructions regarding the new sample app:
https://github.com/jekuno/milia#sample-app

@jekuno
Copy link
Owner

jekuno commented Jan 31, 2017

Closing it for now. Feel free to add a comment if you still have questions.

@jekuno jekuno closed this as completed Jan 31, 2017
@t0nylombardi
Copy link

I am having the same issue.

Processing by Milia::RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"8e0asnLUyNFAXF6ZLO67h8QVkey054qbJEhyqqZmHvuNUYQpK/gIaHB+cx5DFztD/+puisVDsV0CXsOv3JM7xA==", "user"=>{"email"=>"alombardi.331@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
Completed 400 Bad Request in 18ms (ActiveRecord: 0.0ms)

ActionController::ParameterMissing - param is missing or the value is empty: tenant:

I tried with the rails5-support branch as well ... same issue.

@jekuno
Copy link
Owner

jekuno commented Jul 26, 2017

Could you please have a look at https://github.com/jekuno/milia/issues#issuecomment-318091135 and see whether this helps?

@t0nylombardi
Copy link

t0nylombardi commented Jul 26, 2017

@jekuno this link doesn't lead to anything

@jekuno
Copy link
Owner

jekuno commented Jul 27, 2017

Ok, here's the correct one: #76 (comment)

@emrahyildirim
Copy link

I am having the same issue.

param is missing or the value is empty: tenant

require
actionpack (5.1.4) lib/action_controller/metal/strong_parameters.rb
return key.map { |k| require(k) } if key.is_a?(Array)
value = self[key]
if value.present? || value == false
value
else
raise ParameterMissing.new(key)
end
end
# Alias of #require.
alias :required :require


sign_up_params_tenant
() usr/local/rvm/gems/ruby-2.4.1/bundler/gems/milia-05b72dd72bfa/app/controllers/registrations_controller.rb

protected
def sign_up_params_tenant()
params.require(:tenant).permit( ::Milia.whitelist_tenant_params )
end
def sign_up_params_user()

This is the solution of the error.

Branch I used

ruby '2.4.1'
gem 'rails', '> 5.1.4'
gem 'puma', '
> 3.7'
gem 'sass-rails', '> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '
> 4.2'
gem 'turbolinks', '> 5'
gem 'jbuilder', '
> 2.5'
gem 'milia', github: 'jekuno/milia', branch: 'issue#76'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants