Revision 459:0f9097245756 vendor/plugins
| vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb | ||
|---|---|---|
| 17 | 17 |
@project_id = params[:project_id] |
| 18 | 18 |
|
| 19 | 19 |
# the step we're at in the form |
| 20 |
@publication.current_step = session[:publication_step] |
|
| 20 |
# @publication.current_step = session[:publication_step]
|
|
| 21 | 21 |
|
| 22 | 22 |
@new_publications = [] |
| 23 | 23 |
session[:publications] ||= {}
|
| ... | ... | |
| 34 | 34 |
|
| 35 | 35 |
if @publication.save |
| 36 | 36 |
flash[:notice] = "Successfully created publication." |
| 37 |
redirect_to @publication
|
|
| 37 |
redirect_to :action => :show, :id => @publication, :project_id => @project.id
|
|
| 38 | 38 |
else |
| 39 | 39 |
render :action => 'new' |
| 40 | 40 |
end |
| ... | ... | |
| 187 | 187 |
|
| 188 | 188 |
private |
| 189 | 189 |
|
| 190 |
def find_projectx |
|
| 191 |
# @project variable must be set before calling the authorize filter |
|
| 192 |
@project = Project.find(params[:project_id]) |
|
| 193 |
end |
|
| 194 |
|
|
| 190 |
# TODO: luisf. - only here for debugging purposes |
|
| 191 |
# Find project of id params[:project_id] |
|
| 192 |
def find_project_by_project_id |
|
| 193 |
|
|
| 194 |
logger.error { "FIND PROJECT BY PROJECT ID" }
|
|
| 195 |
|
|
| 196 |
@project = Project.find(params[:project_id]) |
|
| 197 |
rescue ActiveRecord::RecordNotFound |
|
| 198 |
render_404 |
|
| 199 |
end |
|
| 195 | 200 |
end |
Also available in: Unified diff