search for: create_folder

Displaying 3 results from an estimated 3 matches for "create_folder".

2006 Feb 15
6
error_messages_for trouble
...validate # validation test if name == ''test'' errors.add(:name, "Folder cannot be named test") end end end #### Controller ######################## class FolderController < ApplicationController def list @my_folder = MyFolder.new end def create_folder @my_folder = MyFolder.new(params[:folder]) if @my_folder.save flash[:notice] = "Folder created sucessfully" else flash[:notice] = "Error creating folder" end redirect_to :action => "list", :id => params[:id] end end #### View ##...
2005 Aug 28
2
Feature Request - wild idea - folders for executing programs
...n this case a learner program for the spam filter. The folder would be "write only" and attempting to read the folder would generally look like it was empty. Setup would look like this: executable-folder spam-missed { command = /usr/bin/sa-learn spam user = spamd group = spamd create_folder = yes accounts = * } The "create_folder" command says to add the folder to the users lists whether or not it is physically there. The folder appears even if there is no real folder. If it is "no" then it only exists if there is a real folder. The "user" and &quot...
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
...e) but I don''t know how to access the newly created user in order to create the folder with it''s name to upload files later. So far I''ve got this: class RegistrationsController < Devise::RegistrationsController def new super end def create super create_folder end def update super end def create_folder path = Pathname.new('':rails_root/tmp/'') directory_name = ":current_user" Dir.mkdir(path, directory_name) unless File.exists?(directory_name) endend routes.rb devise_for :users, :controllers =>...