mercredi 8 novembre 2017

RoR 3 embarassing error cannot figure out

I have spend the better half of a few days and night getting a Rails intro page (index), new, edit pages up to edit users, for a post/blogging site I am working on as a project. I hope to have a working site (I am finishing a degree as well - done with last class! - this is not for school!) Anyway - this page, all.html.erb should display all users and the code is below:

all.html.erb (not copy/pasting - sorry for mistakes):

<h1>All Users:</h1>
  <%= @users = Users.all %>
  <%= @users.each do |user| %>
     <li>
     <%= user.login %>
     </li>
     <% end %>
     <li>
     <%= link_to "profile", user_path(user.id) %>
     </li>

Again sorry for any formatting mistakes - I do not usually overly format when trying to learn a new language/framework but will get to that. Sorry. I guessing this is obvious, sorry about that, I have not had a change to familiarize myself with Ruby more than what I need here. I just want this to work so I know I understand the framework first, later I will go through rails/ruby files to understand more. Thank you.

Aucun commentaire:

Enregistrer un commentaire