Hi guys I have really strange problem.I have events and enrollments. Every time when I want to make an enrollment for specific event Rails show me:
Error: Param is missing or value is empty: enrollment
When I refresh the page everything is Ok.
new view code:
<%=form_for :enrollment do |f|%>
<%= f.select(:car_id) do %>
<% current_user.cars.each do |c| %>
<%= content_tag(:option, c.mark, value: c.id) %>
<% end %>
<% end %>
<%=f.submit :save %>
<%end%>
Strong params:
def enrollment_params
params.require(:enrollment).permit(:car_id)
end
create method:
def create
#event=Event.find(params[:id])
#enrollment = current_user.enrollments.build(enrollment_params)
#enrollment.save
#event.enrollments<<#enrollment
end
new action:
def new
#enrollment=Enrollment.new
end
Log:
Started POST "/events/39/enrollments/new" for 127.0.0.1 at 2016-05-21 22:53:52 +0300
Processing by EnrollmentsController#create as HTML
Parameters: {"authenticity_token"=>"b4oZl8n8ALq1fgmqweygyWDF8oc7Ew3nelvhst5SRJkza8x92VNo3fXg+/gqw+NfKVPYvJfu9LCthRBGFB0xSA==", "id"=>"39"}
Event Load (0.1ms) SELECT "events".* FROM "events" WHERE "events"."id" = ? LIMIT 1 [["id", 39]]
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 12]]
Completed 400 Bad Request in 5ms (ActiveRecord: 0.2ms)
Routes:
Prefix Verb URI Pattern Controller#Action
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
user_cars GET /users/:user_id/cars(.:format) cars#index
POST /users/:user_id/cars(.:format) cars#create
new_user_car GET /users/:user_id/cars/new(.:format) cars#new
edit_user_car GET /users/:user_id/cars/:id/edit(.:format) cars#edit
user_car GET /users/:user_id/cars/:id(.:format) cars#show
PATCH /users/:user_id/cars/:id(.:format) cars#update
PUT /users/:user_id/cars/:id(.:format) cars#update
DELETE /users/:user_id/cars/:id(.:format) cars#destroy
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
event_comments GET /events/:event_id/comments(.:format) comments#index
POST /events/:event_id/comments(.:format) comments#create
new_event_comment GET /events/:event_id/comments/new(.:format) comments#new
edit_event_comment GET /events/:event_id/comments/:id/edit(.:format) comments#edit
event_comment GET /events/:event_id/comments/:id(.:format) comments#show
PATCH /events/:event_id/comments/:id(.:format) comments#update
PUT /events/:event_id/comments/:id(.:format) comments#update
DELETE /events/:event_id/comments/:id(.:format) comments#destroy
event_results GET /events/:event_id/results(.:format) results#index
POST /events/:event_id/results(.:format) results#create
new_event_result GET /events/:event_id/results/new(.:format) results#new
edit_event_result GET /events/:event_id/results/:id/edit(.:format) results#edit
event_result GET /events/:event_id/results/:id(.:format) results#show
PATCH /events/:event_id/results/:id(.:format) results#update
PUT /events/:event_id/results/:id(.:format) results#update
DELETE /events/:event_id/results/:id(.:format) results#destroy
event_enrollments GET /events/:event_id/enrollments(.:format) enrollments#index
POST /events/:event_id/enrollments(.:format) enrollments#create
new_event_enrollment GET /events/:event_id/enrollments/new(.:format) enrollments#new
edit_event_enrollment GET /events/:event_id/enrollments/:id/edit(.:format) enrollments#edit
event_enrollment GET /events/:event_id/enrollments/:id(.:format) enrollments#show
PATCH /events/:event_id/enrollments/:id(.:format) enrollments#update
PUT /events/:event_id/enrollments/:id(.:format) enrollments#update
DELETE /events/:event_id/enrollments/:id(.:format) enrollments#destroy
events GET /events(.:format) events#index
POST /events(.:format) events#create
new_event GET /events/new(.:format) events#new
edit_event GET /events/:id/edit(.:format) events#edit
event GET /events/:id(.:format) events#show
PATCH /events/:id(.:format) events#update
PUT /events/:id(.:format) events#update
DELETE /events/:id(.:format) events#destroy
GET /attend/:id(.:format) events#attend
POST /cancel/:id(.:format) events#cancel
all GET /all(.:format) users#all
POST /all(.:format) users#all
myevents GET /myevents(.:format) users#myevents
POST /myevents(.:format) users#myevents
POST /events/:id/comments/new(.:format) comments#create
GET /events/:id/comments(.:format) comments#index
PUT /events/:id/comments/:id/edit(.:format) comments#edit
POST /events/:id/like(.:format) events#like
GET /events/:id/like(.:format) events#like
POST /events/:id/unlike(.:format) events#unlike
GET /events/:id/unlike(.:format) events#unlike
POST /users/:id/cars/new(.:format) cars#create
DELETE /events/:id/enrollments/:id(.:format) enrollments#destroy
GET /users/:id/usercars(.:format) users#usercars
GET /users/:id/userevents(.:format) users#userevents
POST /events/:id/results/new(.:format) results#create
GET /events/:id/statistics(.:format) results#statistics
GET /events/:id/classfwd(.:format) results#classfwd
GET /events/:id/classrwd(.:format) results#classrwd
GET /events/:id/classawd(.:format) results#classawd
GET /events/:id/enrollments(.:format) enrollments#index
GET /users/:id/mygallery(.:format) users#mygallery
root GET / welcome#Welcome
Your error log shows you are trying to commit a post when going to "/events/39/enrollments/new". This route needs to be a 'get' request or it will try to post to the server without any parameters included! Go into your config/routes file and change that from a 'post' to a 'get' route and this shouldn't happen.
Edit: You need to include the nested attribute in your form:
<%= form_for([#event, #enrollment]) do |f| %>
You then need to define #event in your new action with the params being passed in the url to it as you do in the create action. Using these objects instead of :enrollment should also guide it to using the right action (create) instead of posting to new.
Related
I'm working in a project that has a user to user friendship feature.
I don't know what is happening with my routes, but this is my output in html:
/friends.Friends -> this was supposed to be a link "friends", but when I click on it nothing happens
and
/friend_requests.Friend%20requests -> it was also supposed to be a link "friend_requests"
Rails.application.routes.draw do
root "events#index"
devise_for :users
devise_scope :user do
get "login", :to => "devise/sessions#new"
get "logout", :to => "devise/sessions#destroy"
get "signup", :to => "devise/registrations#new"
end
resources :users, :only => [ :index, :show ]
resources :friendships, :only => [:create, :update, :destroy]
get '/friend_requests', to: 'friend_requests#index'
get '/friends', to: 'friends#index'
resources :events
end
and this is what i did in my view:
<%= link_to friends_path "Friends" %>
<br>
<%= link_to friend_requests_path "Friend requests" %>
This is the output of bundle exec rake routes
Prefix Verb URI Pattern Controller#Action
root GET / events#index
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
user_password PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
POST /users/password(.:format) devise/passwords#create
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
user_registration PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
POST /users(.:format) devise/registrations#create
login GET /login(.:format) devise/sessions#new
logout GET /logout(.:format) devise/sessions#destroy
signup GET /signup(.:format) devise/registrations#new
users GET /users(.:format) users#index
user GET /users/:id(.:format) users#show
friendships POST /friendships(.:format) friendships#create
friendship PATCH /friendships/:id(.:format) friendships#update
PUT /friendships/:id(.:format) friendships#update
DELETE /friendships/:id(.:format) friendships#destroy
friend_requests GET /friend_requests(.:format) friend_requests#index
friends GET /friends(.:format) friends#index
events GET /events(.:format) events#index
POST /events(.:format) events#create
new_event GET /events/new(.:format) events#new
edit_event GET /events/:id/edit(.:format) events#edit
event GET /events/:id(.:format) events#show
PATCH /events/:id(.:format) events#update
PUT /events/:id(.:format) events#update
DELETE /events/:id(.:format) events#destroy
page GET /*id high_voltage/pages#show
rails_service_blob GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show
rails_blob_representation GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show
rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show
update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update
rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create
When I acces by typing localhost:300/friends or localhost:300/friend_requests it works
but when I try to use link to, it's broken :/
The order of your arguments is not correct.
From the Docs
link_to(name = nil, options = nil, html_options = nil, &block) public
Creates an anchor element of the given name using a URL created by the set of options. See the valid options in the documentation for url_for. It’s also possible to pass a String instead of an options hash, which generates an anchor element that uses the value of the String as the href for the link. Using a :back Symbol instead of an options hash will generate a link to the referrer (a JavaScript back link will be used in place of a referrer if none exists). If nil is passed as the name the value of the link itself will become the name.
The name should be passed as first argument but you are passing it as second.
Try to swap the arguments like this:
<%= link_to "Friends" ,friends_path %>
<br>
<%= link_to "Friend requests", friend_requests_path %>
Your link_to helper in the view is not ok,
link_to(name = nil, options = nil, html_options = nil, &block)
<%= link_to "Friends", friends_path %>
<br>
<%= link_to "Friend requests", friend_requests_path %>
Hi and thanks in advance for any help.
I have an admin page: views/admin/admin_page
and a form located in: views/videos/_new
The form renders nicely inside of the admin_page however when I submit the form the url seems to inherit "admin" from either my AdminController or my views/admin folder and appends it to the url I specify in my form. For instance the form below posts to /admin/users/profile/videos.
Can someone help me fix this, please?
videos/_new.html.erb
<%= form_for #video, url: 'users/profile/videos', controller: "videos", method: 'post', :html => { multipart: true } do |f| %>
<div class="form-group">
<%= f.label :avatar %>
<%= f.file_field :avatar, class: 'form-control' %>
</div>
<%= f.submit 'Submit',class: 'btn btn-default' %>
Routes:
Rails.application.routes.draw do
devise_for :users
resources :users do
resource :profile do
resources :videos
end
end
get 'admin/ad_pg', :to => 'admin#ad_pg'
end
Rake Routes:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
user_password PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
POST /users/password(.:format) devise/passwords#create
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
user_registration PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
POST /users(.:format) devise/registrations#create
user_profile_videos GET /users/:user_id/profile/videos(.:format) videos#index
POST /users/:user_id/profile/videos(.:format) videos#create
new_user_profile_video GET /users/:user_id/profile/videos/new(.:format) videos#new
edit_user_profile_video GET /users/:user_id/profile/videos/:id/edit(.:format) videos#edit
user_profile_video GET /users/:user_id/profile/videos/:id(.:format) videos#show
PATCH /users/:user_id/profile/videos/:id(.:format) videos#update
PUT /users/:user_id/profile/videos/:id(.:format) videos#update
DELETE /users/:user_id/profile/videos/:id(.:format) videos#destroy
new_user_profile GET /users/:user_id/profile/new(.:format) profiles#new
edit_user_profile GET /users/:user_id/profile/edit(.:format) profiles#edit
user_profile GET /users/:user_id/profile(.:format) profiles#show
PATCH /users/:user_id/profile(.:format) profiles#update
PUT /users/:user_id/profile(.:format) profiles#update
DELETE /users/:user_id/profile(.:format) profiles#destroy
POST /users/:user_id/profile(.:format) profiles#create
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
root GET / pages#home
contacts GET /contacts(.:format) contacts#index
POST /contacts(.:format) contacts#create
new_contact GET /contacts/new(.:format) contacts#new
edit_contact GET /contacts/:id/edit(.:format) contacts#edit
contact GET /contacts/:id(.:format) contacts#show
PATCH /contacts/:id(.:format) contacts#update
PUT /contacts/:id(.:format) contacts#update
DELETE /contacts/:id(.:format) contacts#destroy
admin_ad_pg GET /admin/ad_pg(.:format) admin#ad_pg
admin/ad_pg is my "admin page"
Thanks again,
Matt
The matching route is /users/:user_id/profile/videos(.:format) but your url is users/profile/videos which has two problems. It is not absolute (it should start with a '/' and it does not include the :user_id segment). You should probably use the helper:
<%= form_for #video, url: user_profile_videos(user_id: #video.user_id), ...
Or something similar
I made a latest posts box in my app at the root. In this box I have post which belongs to topic. Maybe its a stupid question but how can I redirect click on post to the topic where it belongs?
This redirects me to localhost:3000/topics, how to add topic_id's to this path?
This is how I get the latest posts:
controller:
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?
helper_method :latest_posts
def latest_posts
#posts ||= Post.all.order("created_at desc").limit(3)
end
end
index:
<% latest_posts.each do |posts| %>
<div class="bs-callout bs-callout-warning">
<p><%= link_to post.content.html_safe, topic_path(post.topic) %></p>
</div>
<% end %>
routes.rb:
devise_for :users
get 'categories' => 'categories#index'
resources :topics
resources :posts
resources :users
Routes:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
categories GET /categories(.:format) categories#index
topics GET /topics(.:format) topics#index
POST /topics(.:format) topics#create
new_topic GET /topics/new(.:format) topics#new
edit_topic GET /topics/:id/edit(.:format) topics#edit
topic GET /topics/:id(.:format) topics#show
PATCH /topics/:id(.:format) topics#update
PUT /topics/:id(.:format) topics#update
DELETE /topics/:id(.:format) topics#destroy
posts GET /posts(.:format) posts#index
POST /posts(.:format) posts#create
new_post GET /posts/new(.:format) posts#new
edit_post GET /posts/:id/edit(.:format) posts#edit
post GET /posts/:id(.:format) posts#show
PATCH /posts/:id(.:format) posts#update
PUT /posts/:id(.:format) posts#update
DELETE /posts/:id(.:format) posts#destroy
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
root GET / categories#index
You're going to want to first iterate through the posts, then link to the topic base on the single instance of post.
<h5>Here are all of my posts</h5>
<% #posts.each do |post| %>
<%= link_to post.content.html_safe, topic_path(post.topic) %>
<% end %>
Here is a solid Rails guides post on ActionView and rendering. It's definitely worth the read.
Assuming you have defined the show route in your config/routes.rb, you can use the topic_path helper.
<%= link_to posts.content.html_safe, topic_path(topic) %>
Where topic is the instance which you want to redirect to.
I realize this question has been asked many times, but I've tried all the solutions I can find, and have gotten nowhere.
In my view, I have
= link_to "Delete", evint_path(e), :method => :delete, data: {:confirm => 'Are you sure?'}
where e is an instance of evint. I keep getting error messages declaring that I'm missing a GET method for evint:
No route matches [GET] "/evints/5"
This isn't even the case! When I rake routes, I have a GET route for evints.
I have jquery-rails in my Gemfile; I have "require jquery_ujs" in my application.js file. I have five other apps on the same system that work, so I don't think it's a system problem.
The html being generated by my code looks OK:
<a rel="nofollow" href="/evints/5" data-method="delete" data-confirm="Are you sure?">Delete</a>
I've tried removing "//= require tree ." from my application.js file, but that didn't make any difference.
I'm also having trouble signing out of my app, as devise's destroy_session also isn't working!
Does anybody have any ideas? This is driving me crazy!
EDIT: Here are my routes:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
interests GET /interests(.:format) interests#index
POST /interests(.:format) interests#create
new_interest GET /interests/new(.:format) interests#new
edit_interest GET /interests/:id/edit(.:format) interests#edit
interest GET /interests/:id(.:format) interests#show
PATCH /interests/:id(.:format) interests#update
PUT /interests/:id(.:format) interests#update
DELETE /interests/:id(.:format) interests#destroy
events GET /events(.:format) events#index
POST /events(.:format) events#create
new_event GET /events/new(.:format) events#new
edit_event GET /events/:id/edit(.:format) events#edit
event GET /events/:id(.:format) events#show
PATCH /events/:id(.:format) events#update
PUT /events/:id(.:format) events#update
DELETE /events/:id(.:format) events#destroy
images GET /images(.:format) images#index
POST /images(.:format) images#create
new_image GET /images/new(.:format) images#new
image GET /images/:id(.:format) images#show
DELETE /images/:id(.:format) images#destroy
evints GET /evints(.:format) evints#index
POST /evints(.:format) evints#create
new_evint GET /evints/new(.:format) evints#new
evint DELETE /evints/:id(.:format) evints#destroy
projects GET /projects(.:format) projects#index
POST /projects(.:format) projects#create
new_project GET /projects/new(.:format) projects#new
edit_project GET /projects/:id/edit(.:format) projects#edit
project PATCH /projects/:id(.:format) projects#update
PUT /projects/:id(.:format) projects#update
projectimages GET /projectimages(.:format) projectimages#index
POST /projectimages(.:format) projectimages#create
new_projectimage GET /projectimages/new(.:format) projectimages#new
projectimage GET /projectimages/:id(.:format) projectimages#show
DELETE /projectimages/:id(.:format) projectimages#destroy
welcome_index GET /welcome/index(.:format) welcome#index
root GET / welcome#index
welcome_readpdf GET /welcome/readpdf(.:format) welcome#readpdf
UPDATE: This was all a horrible mistake - I was updating the wrong routes file!
this does work: get 'users/:id/groups/' => 'users#groups'
I'd like to be able to see groups that belong to a specific user but I'm having trouble setting up a route that would resolve to:
/users/:id/groups
for some reason. I'm guessing devise is getting in the way, perhaps.
i've tried the following:
resources :users
match '/users/:id/groups', to: 'users#groups', via: :get
and
resources :users do
member do
get 'groups'
end
end
such a route never shows up when i call rake routes:
$ rake routes
Prefix Verb URI Pattern Controller#Action
groups GET /groups(.:format) groups#index
POST /groups(.:format) groups#create
new_group GET /groups/new(.:format) groups#new
edit_group GET /groups/:id/edit(.:format) groups#edit
group GET /groups/:id(.:format) groups#show
PATCH /groups/:id(.:format) groups#update
PUT /groups/:id(.:format) groups#update
DELETE /groups/:id(.:format) groups#destroy
calendar GET /calendar(/:year(/:month))(.:format) calendar#index {:year=>/\d{4}/, :month=>/\d{1,2}/}
root GET / calendar#index
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) registrations#cancel
user_registration POST /users(.:format) registrations#create
new_user_registration GET /users/sign_up(.:format) registrations#new
edit_user_registration GET /users/edit(.:format) registrations#edit
PATCH /users(.:format) registrations#update
PUT /users(.:format) registrations#update
DELETE /users(.:format) registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
accept_user_invitation GET /users/invitation/accept(.:format) devise/invitations#edit
remove_user_invitation GET /users/invitation/remove(.:format) devise/invitations#destroy
user_invitation POST /users/invitation(.:format) devise/invitations#create
new_user_invitation GET /users/invitation/new(.:format) devise/invitations#new
PATCH /users/invitation(.:format) devise/invitations#update
PUT /users/invitation(.:format) devise/invitations#update
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
events GET /events(.:format) events#index
POST /events(.:format) events#create
new_event GET /events/new(.:format) events#new
edit_event GET /events/:id/edit(.:format) events#edit
event GET /events/:id(.:format) events#show
PATCH /events/:id(.:format) events#update
PUT /events/:id(.:format) events#update
DELETE /events/:id(.:format) events#destroy
Why are you specifying member when you're trying to nest the resource? Did you try simply
resources :users do
resources :groups, only: :index
end