
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A Rails generator to create admin scaffolding with searching and sorting for a model.
The generator is pretty opinionated, because I wrote this after I became tired of writing the same code over and over. It expects that your admin controllers will reside under app/controllers/admin and use namespaced restful routes. It also expects a base admin controller named Admin::AdminController, but this is a single edit in the generated controller if you do not use that.
gem install admin_views
This library uses the will_paginate and formtastic gems.
Create the model that you need, make sure the db table is generated too. Then:
script/generate admin_views User
This will generate:
app/controllers/admin/users_controller.rb
app/views/admin/users/_form.html.erb
app/views/admin/users/_user.html.erb
app/views/admin/users/edit.html.erb
app/views/admin/users/index.html.erb
app/views/admin/users/new.html.erb
app/views/admin/users/show.html.erb
Add the model resource route to your routes.rb. Example:
map.namespace :admin do |admin|
admin.resources :users
admin.root :controller => 'users'
end
Edit the generated index.html.erb and _user.html.erb to only display the fields that you need. By default they show all fields for the model. Same with the _form.html.erb and show.html.erb.
Copyright (c) 2010 Conor Hunt conor.hunt@gmail.com Released under the MIT license
FAQs
Unknown package
We found that admin_views demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.