This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProfilesController < ApplicationController | |
before_filter :authenticate_user!, only: [:create, :new, :edit, :update, :destroy] | |
#added destroy to above, not in Treebook | |
def index | |
if params[:interest] | |
@profiles = Profile.tagged_with(params[:interest]) | |
else | |
@profiles = Profile.all | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="profile-present"> | |
<div id="profile-profile_name"> | |
<h1> | |
<p> | |
<%= @profile.profile_name %></span> | |
</p> | |
</h1> | |
</div><hr/> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="page-header"> | |
<h1>All Profiles</h1> | |
</div> | |
<p> | |
<div class="tag_cloud"> | |
<% tag_cloud Profile.interest_counts, %w{s m l} do |interest, css_class| %> | |
<%= link_to interest.name, interest_path(interest.name), class: css_class %> | |
<% end %> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@profile) do |f| %> | |
<p> | |
<%= f.label :Profile_Name %><br> | |
<%= f.text_field :profile_name %> | |
</p> | |
<p> | |
<%= f.label :Background %><br> | |
<%= f.text_area :about %> |
NewerOlder