Skip to content

Questions on Overriding Controller Methods and Resource Attributes in Madmin::ResourceController #28

Answered by excid3
oleoneto asked this question in Q&A
Discussion options

You must be logged in to vote

It's pretty straightforward! When you generate a resource, it will generate a matching controller that you can override as needed.

For example rails g madmin:resource Post generates app/controllers/madmin/posts_controller.rb. You can override the create action there.

Refer to the resources_controller to see what you have accessible and how the normal create action looks: https://github.com/excid3/madmin/blob/master/app/controllers/madmin/resource_controller.rb

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oleoneto
Comment options

Answer selected by oleoneto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants