Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipients controller & spec #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fosome
Copy link

@Fosome Fosome commented Jan 9, 2017

Overview

Move recipients index out to region_admin namespace, separate controller.
Add integration test.

Related to efforts #53 #62

@@ -0,0 +1,36 @@
class RegionAdmin::RecipientsController < ApplicationController
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got rails g'd again - updating module definition.

@Fosome Fosome force-pushed the rf/recipients-controller-spec branch from d72ec19 to 03ffdea Compare January 9, 2017 22:54
@Fosome Fosome force-pushed the rf/recipients-controller-spec branch 2 times, most recently from d72fe83 to e473135 Compare January 18, 2017 16:09
@@ -95,7 +95,7 @@

<%= drop_down "Region Admin" do %>
<%= menu_item "Donors", region_admin_donors_url %>
<%= menu_item "Recipients", recipients_locations_path %>
<%= menu_item "Recipients", region_admin_recipients_url %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change from _path to _url here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real change is adding the region_admin prefix. I switched the _path to _url as a matter of preference

<% end %>
<%= link_to "Edit", edit_location_url(location) %><br>
<%= link_to "Delete", location_url(location), :confirm => "Are you sure?", :method => :delete %>
</td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this view is missing a few table columns that were originally shown when this list was rendered with locations/index.html.erb. Was this intentional?

https://github.com/boulder-food-rescue/food-rescue-robot/blob/rf/recipients-controller-spec/app/views/locations/index.html.erb#L40-L49

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional - there were too many fields in a row. All the data is visible on the #show page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants