add moved dev controller to use the user post api
This commit is contained in:
parent
7f5b98a6cb
commit
ea0f0fbdc5
1 changed files with 1 additions and 4 deletions
|
|
@ -62,11 +62,8 @@ class DevUtilitiesController < ApplicationController
|
||||||
|
|
||||||
@fixture_name = File.join(File.dirname(__FILE__), "..", "..", "public", "images", "user", "#{username}.jpg")
|
@fixture_name = File.join(File.dirname(__FILE__), "..", "..", "public", "images", "user", "#{username}.jpg")
|
||||||
|
|
||||||
photo = Photo.new
|
photo = current_user.post(:photo, :user_file => File.open(@fixture_name), :to => 'all')
|
||||||
photo.person = current_user.person
|
|
||||||
photo.image.store! File.open(@fixture_name)
|
|
||||||
photo.save
|
photo.save
|
||||||
photo.reload
|
|
||||||
|
|
||||||
current_user.raw_visible_posts << photo
|
current_user.raw_visible_posts << photo
|
||||||
current_user.save
|
current_user.save
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue