You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am pretty new to Ruby and have to fix a ThingSpeak server.
The problem is, the admin account cannot delete any accounts or Channels.
Neither of these errors show an application trace, only full traces
Error of Account-deletion:
NoMethodError in Admin::ChannelsController#destroy
undefined method `name' for nil:NilClass
Full-Trace:
ctiveAdmin.register User do
require 'csv'
filter :email
filter :login
filter :created_at
permit_params :email, :login, :bio, :website
index do
column :id
column :email
column :login
column :created_at
actions
end
show do
attributes_table do
rows :id, :email, :login, :time_zone, :bio, :website, :created_at, :sign_in_count, :current_sign_in_at, :last_sign_in_at, :current_sign_in_ip, :last_sign_in_ip
end
panel 'Channels' do
table_for user.channels do
column :id
column(:name) { |channel| link_to channel.name, channel }
end
end
end
form do |f|
f.semantic_errors *f.object.errors.keys
f.inputs :email, :login
f.actions
end
# custom action for signups per day
collection_action :signups, :method => :get, :format => :csv do
@csv_headers = [:day, :signups]
@days = User.signups_per_day
end
# custom action for emails list
collection_action :emails, :method => :get do
@users = User.all
end
end
I don't know which other info is important, feel free to ask if anything else is needed.
Does anyone have a clue how to fix this?
Thanks in advice
TJ
The text was updated successfully, but these errors were encountered:
Hello,
I am pretty new to Ruby and have to fix a ThingSpeak server.
The problem is, the admin account cannot delete any accounts or Channels.
Neither of these errors show an application trace, only full traces
Error of Account-deletion:
NoMethodError in Admin::ChannelsController#destroy
undefined method `name' for nil:NilClass
Full-Trace:
As for the channel-deletion, its the same as Issue #52 , except for the fact, that there is no application Trace shown.
admin-user routing:
Each user can delete their own account without problem, just the admin account cannot do that.
app/controlers/users_controller.rb (pastebin) (used pastebin due to long file)
app/admin/user.rb
I don't know which other info is important, feel free to ask if anything else is needed.
Does anyone have a clue how to fix this?
Thanks in advice
TJ
The text was updated successfully, but these errors were encountered: