This file contains hidden or 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
<!-- wiki_collaborations/add_or_remove.html.erb --> | |
<!-- how can this be cleaned up? --> | |
<div class="row"> | |
<div class="col-sm-6"> | |
<%= form_for wiki, url: wiki_collaborations_path, method: :post do %> | |
<%= hidden_field_tag :wiki_id, wiki.id %> | |
<% @users.each do |user| %> | |
<% next if current_user == user %> | |
<div class="checkbox"> |
This file contains hidden or 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
<% @posts.each do |post| %> | |
<div class="media"> | |
<%= render partial: 'votes/voter', locals: { topic: @topic, post: post } %> | |
<div class="media-body"> | |
<h4 class="media-heading"> | |
<%= link_to (markdown post.title), [@topic, post] %> | |
<%= image_tag(post.image.thumb.url) if post.image? %> | |
<br> | |
<small> | |
<%= image_tag(post.user.avatar.tiny.url) if post.user.avatar? %> |
This file contains hidden or 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 Shape | |
attr_accessor :color | |
def can_fit?(shape) | |
area > shape.area | |
end | |
end | |
class Rectangle < Shape | |
attr_accessor :width, :height |
NewerOlder