Class: RailsEmbedEditor::EditorController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RailsEmbedEditor::EditorController
- Defined in:
- app/controllers/rails_embed_editor/editor_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/rails_embed_editor/editor_controller.rb', line 3 def edit filename = params[:filename] text = params[:content] if filename.nil? or text.nil? render :json => {:success => false, :params => params.to_json} else manager = RailsEmbedEditor::FileManager.(filename, params) manager.save_text text render :json => {:success => true} end end |