Class: DataVaultsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/data_vaults_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



2
3
4
5
# File 'app/controllers/data_vaults_controller.rb', line 2

def show
  @data_vault = DataVault.find(params[:id])
  render :text => @data_vault.data
end

#updateObject



7
8
9
10
11
# File 'app/controllers/data_vaults_controller.rb', line 7

def update
  @data_vault = DataVault.find(params[:id])
  @data_vault.update_attribute(:data, params[:value])
  render :text => ::Kramdown::Document.new(@data_vault.data).to_html
end