restarone / violet_rails

an app engine for your business. Seamlessly implement business logic with a powerful API. Out of the box CMS, blog, forum and email functionality. Developer friendly & easily extendable for your next SaaS/XaaS project. Built with Rails 6, Devise, Sidekiq & PostgreSQL
https://violet.restarone.solutions
MIT License
95 stars 43 forks source link

[Violet Rails Core]: Change scoping of api_clients and redirection after api_resource is deleted. #648

Closed alis-khadka closed 2 years ago

alis-khadka commented 2 years ago

image In the above image, the url gives the indication that the displayed api_clients are under a specific api_namespace. But, we are displaying all the api_clients in this page.

# GET /api_clients or /api_clients.json
  def index
    @api_clients = ApiClient.all
  end

And the redirect is wrong too (we should remove the view that is rendered on the redirect after the user deletes an API resource).

donrestarone commented 2 years ago

https://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_back

Screenshot from 2022-06-06 20-50-01