Class: RedmineWithGitController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RedmineWithGitController
- Defined in:
- app/controllers/redmine_with_git_controller.rb
Instance Method Summary collapse
Instance Method Details
#export ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/redmine_with_git_controller.rb', line 12 def export Tempfile.open('redmine_export') do |file| ::RedmineWithGit::Dump::All.new(file.path, true) send_file(file.path, filename: export_file_name, type: 'application/x-tar', size: file.size) end end |
#import ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/controllers/redmine_with_git_controller.rb', line 20 def import @load = ::RedmineWithGit::Tableless::Load.new(import_params) @load.save respond_to do |format| format.html { import_respond_to_html } format.api { render_validation_errors(@load) } end end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/redmine_with_git_controller.rb', line 8 def index @load = ::RedmineWithGit::Tableless::Load.new end |