jedd/jedd.api/app/controllers/V1/directories_controller.rb
##
# Lists the content of 'root' directory of certain profile
#
# + GET /profile/:profile_id/directories.json +
#
# params:
# * profile_id - id of profile(user)
Lists the content of 'root' directory of certain profile


Lists the content of ' root ' directory of certain profile
def index
		@directories = []
		root_directory = Jedd::Directory.joins(:v_user).where(:v_users => {:nick => params[:v_user_nick]}).includes(:jedd_file_nodes).first
		not_found unless root_directory
		if root_directory
			@directories << root_directory
		end
	end
def index @directories = [ ] root_directory = Jedd :: Directory . joins ( :v_user ) . where ( :v_users => { :nick => params [ :v_user_nick ] } ) . includes ( :jedd_file_nodes ) . first not_found unless root_directory if root_directory @directories << root_directory end end
Lists the content of 'root' directory of certain profile
+ GET /profile/:profile_id/directories.json +
Lists the content of ' root ' directory of certain profile + GET / profile / : profile_id / directories . json +
# root_directory = V::User.find_by_nick(params[:v_user_nick]).jedd_directories.where(:jedd_directory_id => nil).joins(:jedd_directories => [:jedd_file_nodes]).first