robustdj's specs now green
This commit is contained in:
parent
bbd8cadc14
commit
7fdd0475ae
2 changed files with 15 additions and 9 deletions
|
|
@ -17,8 +17,13 @@ class AlbumsController < ApplicationController
|
|||
aspect = params[:album][:to]
|
||||
|
||||
@album = current_user.post(:album, params[:album])
|
||||
flash[:notice] = I18n.t 'albums.create.success', :name => @album.name
|
||||
redirect_to :action => :show, :id => @album.id, :aspect => aspect
|
||||
if @album.persisted?
|
||||
flash[:notice] = I18n.t 'albums.create.success', :name => @album.name
|
||||
redirect_to :action => :show, :id => @album.id, :aspect => aspect
|
||||
else
|
||||
flash[:error] = I18n.t 'albums.create.failure'
|
||||
redirect_to albums_path(:aspect => aspect)
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
|||
|
|
@ -146,15 +146,16 @@ class User
|
|||
|
||||
post = build_post(class_name, options)
|
||||
|
||||
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
|
||||
push_to_aspects(post, aspect_ids)
|
||||
|
||||
if options[:public] == true
|
||||
self.services.each do |service|
|
||||
self.send("post_to_#{service.provider}".to_sym, service, post.message)
|
||||
if post.persisted?
|
||||
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
|
||||
push_to_aspects(post, aspect_ids)
|
||||
|
||||
if options[:public] == true
|
||||
self.services.each do |service|
|
||||
self.send("post_to_#{service.provider}".to_sym, service, post.message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
post
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue