ish_manager 0.1.8.80 → 0.1.8.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c496047d0ba8bc97bb079a3b8c1376acd3139ade
4
- data.tar.gz: 59c10cd6e7f1f3a9650587f65d47a840e281c30f
3
+ metadata.gz: 6d9a8d31505a005c3b7bd6f97b73db0f687ee53d
4
+ data.tar.gz: 4d29d636bea45aba125ba1c5311f94591b112785
5
5
  SHA512:
6
- metadata.gz: 270b770ce3f3451a12721060b353d5bb56577fd775ba447adb04bf0673e3178a9b85bd2ad921012cb74d5e987c05391ccde5533861008ef51c3bd877be499dbd
7
- data.tar.gz: f8dd14f212e5f2a4d4960e2c308c0ec5d4986ed165332886827e200e6befff8f0718ccafe1858936b59590941483a21fd53a37864514edee9d97a174a9c9fcd1
6
+ metadata.gz: 1ac1422e4d6f740d1569e08d83f366200089f444a1f66bac47419a3f7496dc8ed947fc083ca4f4f21e08bcf3a54fa003aaf19e57b246e2135d981d27b6442e15
7
+ data.tar.gz: e52df38e59402a981e2b254446da9fb32b4e6a750bdf3541d57031539383e93a5992371c44da824cfa91839b5133a5201ea8be404e07a6f9c4443c9d24db9678
@@ -3,11 +3,20 @@ class IshManager::FriendsController < IshManager::ApplicationController
3
3
  def index
4
4
  authorize! :friends_index, IshModels::UserProfile
5
5
  @new_friend = IshModels::UserProfile.new
6
+
7
+ @friends = current_user.profile.friends
8
+ friend_ids = @friends.map &:id
9
+ =begin
10
+ @raw_shared_galleries = @friend.shared_galleries
11
+ @shared_galleries = {}
12
+ @friends.each do |f|
13
+ @shared_galleries[f.email] =
14
+ f.shared_galleries
15
+ =end
6
16
  end
7
17
 
8
18
  def create
9
- @friend = ::IshModels::UserProfile.find_by :email => params[:friend][:email]
10
- puts! @friend, 'friend!'
19
+ @friend = ::IshModels::UserProfile.find_by( :email => params[:friend][:email] ) # .includes( :shared_galleries )
11
20
 
12
21
  authorize! :friends_new, @friend
13
22
 
@@ -69,6 +69,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
69
69
  flash[:notice] = 'Success.'
70
70
  redirect_to galleries_path
71
71
  else
72
+ puts! @gallery.errors.messages, 'cannot save gallery'
72
73
  flash[:error] = 'No Luck. ' + @gallery.errors.messages.to_s
73
74
  render :action => :edit
74
75
  end
@@ -6,7 +6,7 @@ class IshManager::ReportsController < IshManager::ApplicationController
6
6
  def index
7
7
  authorize! :index, Report
8
8
  @reports = Report.unscoped.order_by( :created_at => :desc
9
- ).where( :is_trash => false
9
+ ).where( :is_trash => false, :user_profile => current_user.profile
10
10
  ).page( params[:reports_page]
11
11
  ).per( Report::PER_PAGE )
12
12
  if false === params[:site]
@@ -12,8 +12,6 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
12
12
  end
13
13
 
14
14
  def edit
15
- puts! current_user, 'herehere'
16
-
17
15
  @profile = IshModels::UserProfile.find params[:id]
18
16
  authorize! :edit, @profile
19
17
  end
@@ -5,7 +5,7 @@ class IshManager::VideosController < IshManager::ApplicationController
5
5
 
6
6
  def index
7
7
  authorize! :index, Video.new
8
- @videos = Video.unscoped.order_by( :created_at => :desc )
8
+ @videos = Video.unscoped.where( :user_profile => current_user.profile ).order_by( :created_at => :desc )
9
9
 
10
10
  if params[:city_id]
11
11
  city = City.find params[:city_id]
@@ -1,7 +1,13 @@
1
1
 
2
2
  -# manager/features/_form
3
+ - if @city
4
+ - url = city_features_path( @city )
5
+ - if @site
6
+ - url = site_features_path( @site )
7
+ - if @tag
8
+ - url = tag_features_path( @tag )
3
9
 
4
- = form_for @feature do |f|
10
+ = form_for @feature, :url => url do |f|
5
11
  - if @city
6
12
  = hidden_field_tag :city_id, @city.id
7
13
  City #{@city.name}
@@ -10,7 +10,13 @@
10
10
  .col-sm-6
11
11
  = f.submit 'Add Friend'
12
12
 
13
- - current_user.profile.friends.each do |friend|
13
+ - @friends.each do |friend|
14
14
  .panel
15
15
  .panel-body
16
16
  = friend.email
17
+ .row
18
+ .col-sm-6.description
19
+ Galleries shared with them:
20
+ %ul
21
+ - friend.shared_galleries.each do |g|
22
+ %li= g[:name]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.80
4
+ version: 0.1.8.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox