Skip to content

Commit

Permalink
fix link to edit properties type
Browse files Browse the repository at this point in the history
  • Loading branch information
Astr0surf3r committed Oct 30, 2024
1 parent f186600 commit 6ce9444
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def search_url
end

def row_url(property)
spree.admin_property_path(property)
spree.edit_admin_property_path(property)
end

def page_actions
Expand Down
5 changes: 0 additions & 5 deletions backend/app/controllers/spree/admin/properties_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ def index
respond_with(@collection)
end

def show
@property = Spree::Property.find_by!(id: params[:id])
redirect_to action: :edit
end

private

def collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@
expect(assigns(:collection)).to be_empty
end
end

context "#show" do
it "redirects to edit when a property is found" do
get :show, params: { id: property.id }
expect(response).to redirect_to(edit_admin_property_path(property))
end
end
end

0 comments on commit 6ce9444

Please sign in to comment.