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

Add an organizations page #39

Merged
merged 5 commits into from Oct 26, 2020
Merged

Add an organizations page #39

merged 5 commits into from Oct 26, 2020

Conversation

jacoblurye
Copy link
Collaborator

#31, but with scope reduced to simply reading a list of organizations directly from the officers table.

It could be nice to add summary statistics to each organization's page - e.g., an IA score distribution, median/mean employee income, etc.

end

def show
@organization_officers = Officer.where("organization ILIKE ?", params[:id].gsub("-", " "))
Copy link
Owner

Choose a reason for hiding this comment

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

This will return the first matching record and raise an exception if no record is found:
Officer.find_by!("organization ILIKE ?", ...

app/datatables/organization_datatable.rb Outdated Show resolved Hide resolved
app/controllers/organizations_controller.rb Outdated Show resolved Hide resolved
app/views/organizations/show.html.erb Outdated Show resolved Hide resolved
app/datatables/organization_datatable.rb Outdated Show resolved Hide resolved
* Render data in views directly (no more ajax-datatables)
* Rework organization URL slugs
@nstory nstory merged commit 773e001 into master Oct 26, 2020
@nstory
Copy link
Owner

nstory commented Oct 26, 2020

Merged and deployed to prod! Sorry for the delay, this totally slipped my mind.

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

2 participants