app/controllers/spree/api/v1/states_controller.rb in spree_api-3.7.14.1 vs app/controllers/spree/api/v1/states_controller.rb in spree_api-4.0.0.beta
- old
+ new
@@ -22,13 +22,13 @@
private
def scope
if params[:country_id]
- @country = Country.accessible_by(current_ability, :read).find(params[:country_id])
- @country.states.accessible_by(current_ability, :read).order('name ASC')
+ @country = Country.accessible_by(current_ability, :show).find(params[:country_id])
+ @country.states.accessible_by(current_ability).order('name ASC')
else
- State.accessible_by(current_ability, :read).order('name ASC')
+ State.accessible_by(current_ability).order('name ASC')
end
end
end
end
end