Skip to content
Snippets Groups Projects
Commit 6bee8720 authored by ilya's avatar ilya
Browse files

moved the add people into a partial

parent 62700387
Loading
......@@ -46,7 +46,7 @@ class AspectsController < ApplicationController
def show
@aspect = current_user.aspect_by_id params[:id]
@friends_dropdown_array = current_user.friends.all(:person_id.nin => @aspect.person_ids )
@friends_not_in_aspect = current_user.friends.all(:person_id.nin => @aspect.person_ids )
unless @aspect
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
else
......
......@@ -8,10 +8,9 @@
=t('.add_a_new_friend_to')
%i= aspect.name
= form_tag '/aspects/add_to_aspect', :id => 'add_to_aspect' do
= select_tag :friend_id, options_from_collection_for_select(@friends_dropdown_array, "id", "real_name"), :include_blank => true
= hidden_field_tag :aspect_id, aspect.id
= submit_tag "add to #{@aspect.name}"
- if @friends_not_in_aspect
= render('shared/add_friend_dropdown', :aspect => @aspect, :friends => @friends_not_in_aspect)
......
= form_tag '/aspects/add_to_aspect', :id => 'add_to_aspect' do
= select_tag :friend_id, options_from_collection_for_select(friends, "id", "real_name"), :include_blank => true
= hidden_field_tag :aspect_id, aspect.id
= submit_tag "add to #{aspect.name}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment