Specs: Ensure photos always width and height
This commit is contained in:
parent
91b6a807c7
commit
214c2d7af7
1 changed files with 6 additions and 0 deletions
|
|
@ -24,6 +24,12 @@ class User
|
|||
|
||||
p = build_post(class_name, opts)
|
||||
p.aspects = aspects
|
||||
|
||||
if class_name == :photo
|
||||
p.width = 42 unless opts.has_key? :width
|
||||
p.height = 42 unless opts.has_key? :height
|
||||
end
|
||||
|
||||
if p.save!
|
||||
self.aspects.reload
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue