devise

Devise error: Unpermitted parameters

泪湿孤枕 提交于 2021-01-28 14:07:47
问题 How to register a user with username devise? What I have so far throws me the following error: Error: Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"oa1sf2dgKU/VpgOAI5ocnM8e5gNkuswxX9KKpTLFUZmUwtO40CFoseZiYQ3eQZ71bTw9R3aFOhpbD5EZcAVcGA==", "user"=>{"username"=>"MCarpintini", "email"=>"carpintinimatias@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Register"} Unpermitted parameters: :username,

How should I use Rails to index and query a join table?

半世苍凉 提交于 2021-01-27 04:16:56
问题 I have a ruby on Rails 4 app, using devise and with a User model and a Deal model. I am creating a user_deals table for has_many/has_many relationship between User and Deal. Here is the migration class CreateUserDeals < ActiveRecord::Migration def change create_table :user_deals do |t| t.belongs_to :user t.belongs_to :deal t.integer :nb_views t.timestamps end end end When a user load a Deal (for example Deal id= 4), I use a method called show controllers/deal.rb #for the view of the Deal page

check_authorization causes custom devise controller to fail?

て烟熏妆下的殇ゞ 提交于 2021-01-07 02:52:34
问题 Background I have a simple app with devise and cancancan. Because I wanted to add a little bit of custom logic to the signup process, I used devise with customised controllers, which simply means devise uses the users controller (rather than devise controllers) for all of the things devise does. Problem When I add check_authorization to the application controller, and skip_authorization_check to all of the user (devise) controllers, I still get the following error raised when the user tries

check_authorization causes custom devise controller to fail?

冷暖自知 提交于 2021-01-07 02:51:41
问题 Background I have a simple app with devise and cancancan. Because I wanted to add a little bit of custom logic to the signup process, I used devise with customised controllers, which simply means devise uses the users controller (rather than devise controllers) for all of the things devise does. Problem When I add check_authorization to the application controller, and skip_authorization_check to all of the user (devise) controllers, I still get the following error raised when the user tries

“No verification key available” when attempting to access API secured by Devise JWT

狂风中的少年 提交于 2021-01-01 04:19:39
问题 I have the gem devise-jwt installed. I can perform a login request, and receive an Authorization token in return, but when I try to access a secured endpoint, I receive the message: No verification key available. blaine@devbox:~/langsite/backend [master] $ curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwZWNjMmIzNi04ZmZiLTQ2Y2QtYTZkNi1iZGRjZmU4YTQxNmMiLCJzdWIiOiIxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNjA1ODQ2NjczLCJleHAiOjE2MDU4NzU0NzN9

“No verification key available” when attempting to access API secured by Devise JWT

南楼画角 提交于 2021-01-01 04:18:58
问题 I have the gem devise-jwt installed. I can perform a login request, and receive an Authorization token in return, but when I try to access a secured endpoint, I receive the message: No verification key available. blaine@devbox:~/langsite/backend [master] $ curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwZWNjMmIzNi04ZmZiLTQ2Y2QtYTZkNi1iZGRjZmU4YTQxNmMiLCJzdWIiOiIxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNjA1ODQ2NjczLCJleHAiOjE2MDU4NzU0NzN9

“No verification key available” when attempting to access API secured by Devise JWT

寵の児 提交于 2021-01-01 04:18:00
问题 I have the gem devise-jwt installed. I can perform a login request, and receive an Authorization token in return, but when I try to access a secured endpoint, I receive the message: No verification key available. blaine@devbox:~/langsite/backend [master] $ curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwZWNjMmIzNi04ZmZiLTQ2Y2QtYTZkNi1iZGRjZmU4YTQxNmMiLCJzdWIiOiIxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNjA1ODQ2NjczLCJleHAiOjE2MDU4NzU0NzN9

Rails: Before process_action callback :authenticate_user! has not been defined

百般思念 提交于 2020-12-02 06:39:52
问题 I'm creating a rails app that includes devise. I'm trying to add Twilio messaging to my site with Ngrok, i used this tutorial: https://www.twilio.com/blog/2016/04/receive-and-reply-to-sms-in-rails.html I was able to open Ngrok in the console and get the web-id they give for my url. I keep getting this error when I plug the url into my browser ..I'm supposed to get to my own rails local app. Not sure whats wrong. What I added in my messaging controller made for ngrok: class MessagesController