fixed all cukes; view bugs on streams

This commit is contained in:
danielgrippi 2011-11-03 11:14:37 -07:00
parent 1ac5c7af62
commit 0ab23f337a
7 changed files with 10 additions and 9 deletions

View file

@ -20,7 +20,7 @@ class AspectsController < ApplicationController
:max_time => params[:max_time].to_i)
if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @stream.posts}
render :partial => 'shared/stream', :locals => {:posts => @stream.stream_posts}
end
end

View file

@ -112,7 +112,7 @@ class PeopleController < ApplicationController
end
if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @stream.posts}
render :partial => 'shared/stream', :locals => {:posts => @stream.stream_posts}
else
respond_to do |format|
format.all { respond_with @person, :locals => {:post_type => :all} }

View file

@ -38,7 +38,7 @@ class TagsController < ApplicationController
@stream = Stream::Tag.new(current_user, params[:name], :max_time => max_time, :page => params[:page])
if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @stream.posts}
render :partial => 'shared/stream', :locals => {:posts => @stream.stream_posts}
return
end
end

View file

@ -19,10 +19,10 @@
#gs-shim{:title => "3. #{t('.stay_updated')}", 'data-content' => t('.stay_updated_explanation')}
#main_stream.stream{:data => {:guids => stream.aspect_ids.join(','), :time_for_scroll => time_for_scroll(stream.ajax_stream?, stream)}}
- if !stream.ajax_stream? && stream.stream_posts.length > 0
= render 'shared/stream', :posts => stream.stream_posts
#pagination
=link_to(t('more'), next_page_path(:ajax_stream => stream.ajax_stream?), :class => 'paginate')
- if !stream.ajax_stream? && stream.stream_posts.length > 0
= render 'shared/stream', :posts => stream.stream_posts
#pagination
=link_to(t('more'), next_page_path(:ajax_stream => stream.ajax_stream?), :class => 'paginate')
- if current_user.contacts.size < 2
= render 'aspects/no_contacts_message'

View file

@ -7,7 +7,7 @@ Feature: new user registration
And I fill in "user_email" with "ohai@example.com"
And I fill in "user_password" with "secret"
And I fill in "user_password_confirmation" with "secret"
And I press "Create my account"
And I press "Create my account!"
Then I should be on the getting started page
And I should see "Well, hello there!"
And I should see "Who are you?"

View file

@ -46,6 +46,7 @@ class Stream::Base
Post.scoped
end
# @return [ActiveRecord::Relation<Post>]
def stream_posts
self.posts.for_a_stream(max_time, order, self.user)
end

View file

@ -25,7 +25,7 @@ class Stream::Multi < Stream::Base
# @return [Boolean]
def ajax_stream?
false
true
end
#emits an enum of the groups which the post appeared