Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add upload sample

  • Loading branch information...
commit c79d9240505b48d6cde643e0dbf19744efa1c735 1 parent 73b49fb
Barthez authored
3  app/assets/stylesheets/main.css.sass
@@ -34,6 +34,3 @@ pre
34 34 font-size: 16px
35 35 text-decoration: none
36 36 font-weight: bold
37   - img
38   - overflow: hidden
39   - height: 150px
69 app/assets/stylesheets/scaffolds.css.scss
... ... @@ -1,69 +0,0 @@
1   -body {
2   - background-color: #fff;
3   - color: #333;
4   - font-family: verdana, arial, helvetica, sans-serif;
5   - font-size: 13px;
6   - line-height: 18px;
7   -}
8   -
9   -p, ol, ul, td {
10   - font-family: verdana, arial, helvetica, sans-serif;
11   - font-size: 13px;
12   - line-height: 18px;
13   -}
14   -
15   -pre {
16   - background-color: #eee;
17   - padding: 10px;
18   - font-size: 11px;
19   -}
20   -
21   -a {
22   - color: #000;
23   - &:visited {
24   - color: #666;
25   - }
26   - &:hover {
27   - color: #fff;
28   - background-color: #000;
29   - }
30   -}
31   -
32   -div {
33   - &.field, &.actions {
34   - margin-bottom: 10px;
35   - }
36   -}
37   -
38   -#notice {
39   - color: green;
40   -}
41   -
42   -.field_with_errors {
43   - padding: 2px;
44   - background-color: red;
45   - display: table;
46   -}
47   -
48   -#error_explanation {
49   - width: 450px;
50   - border: 2px solid red;
51   - padding: 7px;
52   - padding-bottom: 0;
53   - margin-bottom: 20px;
54   - background-color: #f0f0f0;
55   - h2 {
56   - text-align: left;
57   - font-weight: bold;
58   - padding: 5px 5px 5px 15px;
59   - font-size: 12px;
60   - margin: -7px;
61   - margin-bottom: 0px;
62   - background-color: #c00;
63   - color: #fff;
64   - }
65   - ul li {
66   - font-size: 12px;
67   - list-style: square;
68   - }
69   -}
2  app/models/comment.rb
... ... @@ -1,3 +1,5 @@
1 1 class Comment < ActiveRecord::Base
2 2 attr_accessible :commentable_id, :commentable_type, :content
  3 +
  4 + belongs_to :commentable, :polymorphic => true
3 5 end
1  app/models/sample.rb
@@ -3,4 +3,5 @@ class Sample < ActiveRecord::Base
3 3 attr_accessible :description, :name, :screenshot, :demo, :category_id
4 4
5 5 belongs_to :category
  6 + has_many :comments, :as => :commentable
6 7 end
BIN  public/system/samples/screenshots/000/000/001/large/upload.png
BIN  public/system/samples/screenshots/000/000/001/medium/upload.png
BIN  public/system/samples/screenshots/000/000/001/original/upload.png
BIN  public/system/samples/screenshots/000/000/001/thumb/upload.png

0 comments on commit c79d924

Please sign in to comment.
Something went wrong with that request. Please try again.