Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # dashboard_controller.rb
- before_filter :authenticate_user!
- def index
- @contacts = current_user.contacts
- end
- # dashboard/index.html.erb
- <% @contacts.each do |contact| %>
- <p>
- <strong><%= contact.name %></strong> <br />
- Phone: <%= contact.phone %>
- Mobile: <%= contact.mobile %>
- Email: <%= contact.email %>
- </p>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement