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

Utskotten trasiga #148

Closed
henrikssn opened this issue Mar 31, 2015 · 9 comments · Fixed by #160
Closed

Utskotten trasiga #148

henrikssn opened this issue Mar 31, 2015 · 9 comments · Fixed by #160

Comments

@henrikssn
Copy link
Contributor

Får 500 när jag försöker gå in på utskotten
http://fsektionen.se/utskott/kultur

Även med id verkar det vara dött
http://fsektionen.se/utskott/1

@davidwessman
Copy link
Member

Jag såg detta igår, har börjat på en branch.
Kan lägga upp den - tänkte göra rework av page + council + posts

@davidwessman
Copy link
Member

Mostly fixed, every Council has a page, and if the page is not set correctly for the already created utskott there will be errors trying to edit them.

@henrikssn
Copy link
Contributor Author

Edit still fails: http://fsektionen.se/utskott/kultur/redigera

@davidwessman
Copy link
Member

Why I didn't close this. Gonna look into it soon.

@davidwessman
Copy link
Member

Cannot reproduce this, need to get into the rails console on the server

@henrikssn
Copy link
Contributor Author

F, [2015-04-08T11:51:26.223149 #16864] FATAL -- : 
ActionView::Template::Error (undefined method `empty?' for 1:Fixnum):
 7:       <%= link_to 'Lägg till post', new_council_post_path(@council), class: "btn-u" %>
 8:       <%= link_to 'Visa poster', council_posts_path(@council), class: "btn-u" %>
 9:       <% if @council.page.present?%>
10:           <%= link_to 'Redigera sida', page_path(@page), class: "btn-u" %>
11:       <% end %>
12:       <hr>
13:       <%= link_to 'Visa utskott', @council, class: "btn-u" %>
app/views/councils/edit.html.erb:10:in `_app_views_councils_edit_html_erb__3494438171469120083_70319986848900'

@davidwessman
Copy link
Member

Yeah, it was because a few values of the Page didn't get set, because I put that into the update-action, which I couldn't do because of the error in the edit-file.
Fixed it in the console. Closing this.

@henrikssn
Copy link
Contributor Author

Kan fortfarande inte visa poster http://fsektionen.se/utskott/kultur/poster

I, [2015-04-08T20:05:19.922421 #5885]  INFO -- : Started GET "/utskott/kultur/poster" for 77.56.165.59 at 2015-04-08 20:05:19 +0200
I, [2015-04-08T20:05:19.923468 #5885]  INFO -- : Processing by PostsController#index as HTML
I, [2015-04-08T20:05:19.923543 #5885]  INFO -- :   Parameters: {"council_id"=>"kultur"}
I, [2015-04-08T20:05:19.943953 #5885]  INFO -- : Completed 404 Not Found in 20ms (ActiveRecord: 3.6ms)
F, [2015-04-08T20:05:19.945061 #5885] FATAL -- : 
ActionController::RoutingError (not found):
  app/controllers/application_controller.rb:24:in `block in <class:ApplicationController>'

Edit: Fler trasiga controllers
http://fsektionen.se/utskott/kultur/poster/ny

Vi borde skapa tester för detta innan du stänger denna.

@henrikssn henrikssn reopened this Apr 8, 2015
@davidwessman
Copy link
Member

It is the routing and some edited actions in the posts_controller.

I feel like we should move permissions to its own controller?
Because now we have:
patch 'permissions/:id´ => 'posts#update_permissions'
Which feels kind of strange.

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

Successfully merging a pull request may close this issue.

2 participants