Admin Dashboard
vipulnsward opened this issue · comments
- Show Users
Requirements:
- Does admin have the permission to update user avatar? Are we supposed to show upload image on admin page?
Work updates:
- Using ActiveAdmin
The latest release of this gem is not compatible with Rails 6.0.0.beta3 version. They have merged the fix in master to support the latest Rails version but that is not released yet. On adding this gem and executingbundle install
we observe this error.
Bundler could not find compatible versions for gem "actionpack":
In snapshot (Gemfile.lock):
actionpack (= 6.0.0.beta3)
In Gemfile:
activeadmin was resolved to 0.2.2, which depends on
meta_search (>= 0.9.2) was resolved to 1.1.0.pre2, which depends on
actionpack (~> 3.1.0.alpha)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
actionpack (= 6.0.0.beta3)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "devise":
In snapshot (Gemfile.lock):
devise (= 4.6.1)
In Gemfile:
devise
activeadmin was resolved to 0.6.4, which depends on
devise (>= 1.5.4, != 2.0.0, != 2.0.1, != 2.0.2, != 2.0.3, != 2.0.4, != 2.1.0, != 2.1.1, != 2.1.2, != 2.2.0, != 2.2.1, != 2.2.2, < 4)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 6.0.0.beta3)
In Gemfile:
rails (~> 6.0.0.beta3)
activeadmin was resolved to 1.0.0.pre3, which depends on
rails (>= 3.2, < 5.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (= 6.0.0.beta3)
In Gemfile:
activeadmin was resolved to 1.0.0.pre5, which depends on
railties (>= 3.2, < 5.1)
devise was resolved to 4.6.1, which depends on
railties (>= 4.1.0, < 6.0)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
railties (= 6.0.0.beta3)
devise was resolved to 4.6.1, which depends on
responders was resolved to 2.4.1, which depends on
railties (>= 4.2.0, < 6.0)
sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
railties (>= 4.0.0, < 6)
bootstrap (~> 4.2.1) was resolved to 4.2.1, which depends on
sassc-rails (>= 2.0.0) was resolved to 2.1.0, which depends on
railties (>= 4.0.0)
web-console (>= 3.3.0) was resolved to 3.7.0, which depends on
railties (>= 5.0)
webpacker (>= 4.0.0.rc.3) was resolved to 4.0.2, which depends on
railties (>= 4.2)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "responders":
In snapshot (Gemfile.lock):
responders (= 2.4.1)
In Gemfile:
devise was resolved to 4.6.1, which depends on
responders
activeadmin was resolved to 0.3.0, which depends on
inherited_resources was resolved to 1.0.5, which depends on
responders (~> 0.4.3)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I also tried to add the gem like
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin', branch: 'master'
But bundle install
still fails.
- Using administrate
The gem version installed was 0.11.0. The gem is working fine. Based on my testing I was able to navigate/admin
and was able to see all users of the system.
PFA screenshots for the same.
Index Page
Show Page
Edit Page
Gem popularity and releases
- ActiveAdmin has more releases and ratings as compared to Administrate.
- The last release for ActiveAdmin was on Dec 2018 and for Administrate it was Sep 2018.
Since Administrate is working with latest rails release should we plan to go with that gem?
@vipulnsward @puneet-sutar please let me know what you guys think. I will create PR's accordingly.
@alkesh26 I like Administrate but it has been in Pre-release for a while now. @vipulnsward Thoughts? really would depend on the vision for this repo and when we are going to make this available to the Public. Administrate API can be unstable and we will have to keep on fixing it until it is stabilized.
Lets try administrate, we can change in future as needed.
Issue:
We are using both Devise and Administrate gem. Devise needs the password to be entered for updating the user's profile.
When we are trying to create New User
from the Admin dashboard, we have to expose the Password field in the form. If not it throws an error saying Password can't be blank
.
But updating a user also exposes and requires the password field on the admin dashboard. Hence to update user details without the password field from the admin dashboard we override the update
method of Administrate gem.
The above issue and solution to this can be referred here.
So in our PR we have added a before_action
filter only on update
action.