Created
May 25, 2013 08:27
-
-
Save thomasstr/5648359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
@project = Project.new(params[:project]) | |
if @project.valid? | |
output = Project.myname(@project.project_name) | |
flash[:notice] = @output | |
redirect_to projects_url(output) | |
# render text: @output, location: projects_path(@output) | |
# redirect_to projects_path | |
else | |
render "new" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output = Project.myname(@project.project_name)
flash[:notice] = @output
Those lines don't make sense. you need to have
flash[:notice] = output
as output is not an instance variable, it is just a local variable