Method: NetworksController#create

Defined in:
app/controllers/networks_controller.rb

#createObject

Création d’un nouveau réseau vide.

Input

  • network[] : Paramètres de création du réseau



111
112
113
114
115
116
117
118
119
# File 'app/controllers/networks_controller.rb', line 111

def create
  @network = Network.new(params[:network])
  if @network.save
    flash[:notice] = 'Network was successfully created.'
    redirect_to :action => 'show', :id => @network
  else
    render :action => 'new'
  end
end