Skip to content

Commit

Permalink
wgettable list of projects for export
Browse files Browse the repository at this point in the history
  • Loading branch information
heatherathebyne committed Nov 9, 2024
1 parent 84cf095 commit 62b2c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/crafters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def projects
end
end

def all_projects
@projects = User.find_by(id: params[:id]).projects
render html: @projects.map {|p| "<a href='/projects/#{p.id}'>#{p.id}</a>"}.to_s.html_safe
end

def autocomplete_project_name_for_current_user
@projects = current_user.projects
.where("name LIKE ?", "%#{params[:name]}%")
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
member do
get :projects
get :stash
get :all_projects
end
end

Expand Down

0 comments on commit 62b2c2f

Please sign in to comment.