Permalink
Browse files

add upload sample

  • Loading branch information...
1 parent 73b49fb commit c79d9240505b48d6cde643e0dbf19744efa1c735 @barthezslavik committed Dec 23, 2012
View
3 app/assets/stylesheets/main.css.sass
@@ -34,6 +34,3 @@ pre
font-size: 16px
text-decoration: none
font-weight: bold
- img
- overflow: hidden
- height: 150px
View
69 app/assets/stylesheets/scaffolds.css.scss
@@ -1,69 +0,0 @@
-body {
- background-color: #fff;
- color: #333;
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
-p, ol, ul, td {
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
-pre {
- background-color: #eee;
- padding: 10px;
- font-size: 11px;
-}
-
-a {
- color: #000;
- &:visited {
- color: #666;
- }
- &:hover {
- color: #fff;
- background-color: #000;
- }
-}
-
-div {
- &.field, &.actions {
- margin-bottom: 10px;
- }
-}
-
-#notice {
- color: green;
-}
-
-.field_with_errors {
- padding: 2px;
- background-color: red;
- display: table;
-}
-
-#error_explanation {
- width: 450px;
- border: 2px solid red;
- padding: 7px;
- padding-bottom: 0;
- margin-bottom: 20px;
- background-color: #f0f0f0;
- h2 {
- text-align: left;
- font-weight: bold;
- padding: 5px 5px 5px 15px;
- font-size: 12px;
- margin: -7px;
- margin-bottom: 0px;
- background-color: #c00;
- color: #fff;
- }
- ul li {
- font-size: 12px;
- list-style: square;
- }
-}
View
2 app/models/comment.rb
@@ -1,3 +1,5 @@
class Comment < ActiveRecord::Base
attr_accessible :commentable_id, :commentable_type, :content
+
+ belongs_to :commentable, :polymorphic => true
end
View
1 app/models/sample.rb
@@ -3,4 +3,5 @@ class Sample < ActiveRecord::Base
attr_accessible :description, :name, :screenshot, :demo, :category_id
belongs_to :category
+ has_many :comments, :as => :commentable
end
View
BIN public/system/samples/screenshots/000/000/001/large/upload.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/system/samples/screenshots/000/000/001/medium/upload.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/system/samples/screenshots/000/000/001/original/upload.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/system/samples/screenshots/000/000/001/thumb/upload.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c79d924

Please sign in to comment.