Class: StylesheetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- StylesheetsController
- Defined in:
- lib/generators/sushi/templates/stylesheets_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
7 8 9 |
# File 'lib/generators/sushi/templates/stylesheets_controller.rb', line 7 def edit @stylesheet = get_stylesheet end |
#open ⇒ Object
2 3 4 5 |
# File 'lib/generators/sushi/templates/stylesheets_controller.rb', line 2 def open stylesheet = get_stylesheet @style = stylesheet.body end |
#update ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/sushi/templates/stylesheets_controller.rb', line 11 def update @stylesheet = get_stylesheet if @stylesheet.update_attributes(params[:stylesheet]) redirect_to(edit_stylesheet_path, :notice => 'Stylesheet was successfully updated.') else render :action => "edit" end end |