Sha256: 93cd9f913469cd6571c0a160b4746024afcb7ba6d35dbb779a19b8dbfbe26644
Contents?: true
Size: 1.1 KB
Versions: 4
Compression:
Stored size: 1.1 KB
Contents
# -*- encoding : utf-8 -*- module LoyalAdmin class Display::BoardsController < ::LoyalAdmin::ApplicationController def index @boards = ::LoyalAdmin::Display::Board.page(params[:page]).per(30) end def show @board = ::LoyalAdmin::Display::Board.find params[:id] end def new @board = ::LoyalAdmin::Display::Board.new end def create @board = ::LoyalAdmin::Display::Board.new(params[:display_board]) if @board.save redirect_to loyal_admin_app.display_board_url(:id => @board.id) else render :new end end def edit @board = ::LoyalAdmin::Display::Board.find params[:id] end def update @board = ::LoyalAdmin::Display::Board.find params[:id] if @board.update_attributes(params[:display_board]) redirect_to loyal_admin_app.display_board_url(:id => @board.id) else render :edit end end def destroy @board = ::LoyalAdmin::Display::Board.find params[:id] @board.destroy redirect_to params[:return_to] || loyal_admin_app.display_boards_url end end end
Version data entries
4 entries across 4 versions & 1 rubygems