app/helpers/application_helper.rb
# adding attachment in new and edit page
adding attachment in new and edit page
adding attachment in new and edit page
def add_attachment_link(name, attachment_name, attachment_model_name)
    link_to_function name do |page|
      page.insert_html :bottom, attachment_name.pluralize.to_sym, :partial => attachments_name, :object => Run.attachment_model_name.to_model.new
    end
  end
def add_attachment_link ( name , attachment_name , attachment_model_name ) link_to_function name do | page | page . insert_html :bottom , attachment_name . pluralize . to_sym , :partial => attachments_name , :object => Run . attachment_model_name . to_model . new end end
adding attachment in new and edit page
adding attachment in new and edit page
name
<not_specific>
attachment_name
<not_specific>
attachment_model_name
<not_specific>