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

fix(app):replace Unapprove with Disapprove #98

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def index_past

def admin_index
@categorized_events = {
"Unapproved Events" => Event.unapproved,
"Dispproved Events" => Event.dispproved,
"Approved Events" => Event.approved.upcoming,
"Past Events"=> Event.approved.past
}
Expand Down
2 changes: 1 addition & 1 deletion app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def self.approved
where(approved: true)
end

def self.unapproved
def self.dispproved
where(approved: false)
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/events/admin_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div>
<ul>
<li><strong><%= link_to event.name, event_admin_path(:id => event.id) %></strong></li>
<li><%= link_to "#{ event.approved ? 'Unapprove' : 'Approve' }", approve_event_path(event), :method => :post %></li>
<li><%= link_to "#{ event.approved ? 'Dispprove' : 'Approve' }", approve_event_path(event), :method => :post %></li>
<li><%= link_to 'Edit', edit_event_path(:id => event.id) %></li>
<li><%= link_to 'Delete', url_for(action: :destroy, id: event.id), method: :delete, data: { confirm: "Are you sure?" } %></li>
<li><%= link_to 'Download CSV', event_admin_path(:id => event.id, :format => :csv), class:'button' %></li>
Expand Down