I need my user to upload such documents in pdf and txt format to their profile. And I did this with Carrierwave, so I have a list of documents with titles and URLs.
But how can I get other users to upload these files? Should I use a gem or is there something native that I donβt even know about, as I am very new to rails?
thanks
EDIT:
society.rb
class Society < ActiveRecord::Base ... has_many :documents, :dependent => :destroy end
document.rb
class Document < ActiveRecord::Base belongs_to :society mount_uploader :url, DocumentUploader end
And then this in the view I want to download files:
<% @society.documents.each do |doc| %> <%= link_to "Download it", doc.url %>
source share