Skip to content

Instantly share code, notes, and snippets.

@nacengineer
Last active December 11, 2015 05:19
Show Gist options
  • Save nacengineer/4551719 to your computer and use it in GitHub Desktop.
Save nacengineer/4551719 to your computer and use it in GitHub Desktop.
user login objects
<% @user.login_list.each do |n| %>
<li><%= n %></li>
<% end %>
# chain this onto the object
def self.last_five(id)
where(:id => id).limit(5).sort('descending')
end
@kasperlewau
Copy link

    <ul>
        <% @user.login_list.each do |n| %>
        <li><%= n %></li>
        <% end %>
    </ul>

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