put the visible back in
This commit is contained in:
parent
7861fe5abc
commit
c102e81b03
4 changed files with 13 additions and 8 deletions
6
app/helpers/groups_helper.rb
Normal file
6
app/helpers/groups_helper.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module GroupsHelper
|
||||
def link_for_group( group )
|
||||
puts request.params
|
||||
link_to group.name, group
|
||||
end
|
||||
end
|
||||
|
|
@ -8,7 +8,7 @@ class User
|
|||
|
||||
key :friend_ids, Array
|
||||
key :pending_request_ids, Array
|
||||
key :_post_ids, Array
|
||||
key :visible_post_ids, Array
|
||||
|
||||
one :person, :class_name => 'Person', :foreign_key => :owner_id
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
%li= link_to "All Groups", root_url
|
||||
- for group in @groups
|
||||
%li{:class => ("selected" if current_group?(group))}
|
||||
= link_to group.name, group
|
||||
= link_for_group group
|
||||
%li.new_group= link_to("new", "#add_group_pane", :id => "add_group_button")
|
||||
|
||||
.yo{ :style => "display:none;"}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ describe Album do
|
|||
@fixture_name = File.dirname(__FILE__) + '/../fixtures/button.png'
|
||||
@user = Factory.create(:user)
|
||||
@user.person.save
|
||||
@album = Album.new(:name => "test collection", :person => @user.person)
|
||||
@group = @user.group(:name => "Foo")
|
||||
@album = @user.post(:album, :name => "test collection", :to => @group.id)
|
||||
end
|
||||
|
||||
it 'should belong to a person' do
|
||||
@album.person = nil
|
||||
@album.valid?.should be false
|
||||
person = Factory.create(:person)
|
||||
@album.person = person
|
||||
@album.person = Factory.create(:person)
|
||||
@album.valid?.should be true
|
||||
@album.save
|
||||
person.albums.count.should == 1
|
||||
|
|
@ -27,11 +27,10 @@ describe Album do
|
|||
end
|
||||
|
||||
it 'should contain photos' do
|
||||
album = Album.create(:name => "test collection", :person => @user.person)
|
||||
photo = Factory.build(:photo, :person => @user.person)
|
||||
|
||||
album.photos << photo
|
||||
album.photos.count.should == 1
|
||||
@album.photos << photo
|
||||
@album.photos.count.should == 1
|
||||
end
|
||||
|
||||
it 'should remove all photos on album delete' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue