diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/news_controller.rb | 2 | ||||
-rw-r--r-- | app/views/news/edit.rhtml | 2 | ||||
-rw-r--r-- | app/views/news/index.rhtml | 2 | ||||
-rw-r--r-- | app/views/news/new.rhtml | 2 | ||||
-rw-r--r-- | app/views/news/show.rhtml | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index c9ba6b991..8c1a03a5b 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -18,7 +18,7 @@ class NewsController < ApplicationController layout 'base' before_filter :find_news, :except => [:new, :index, :preview] - before_filter :find_project, :only => :new + before_filter :find_project, :only => [:new, :preview] before_filter :authorize, :except => [:index, :preview] before_filter :find_optional_project, :only => :index accept_key_auth :index diff --git a/app/views/news/edit.rhtml b/app/views/news/edit.rhtml index a7e5e6e36..4be566e0b 100644 --- a/app/views/news/edit.rhtml +++ b/app/views/news/edit.rhtml @@ -5,7 +5,7 @@ <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml index 87db8a5f7..9cac39002 100644 --- a/app/views/news/index.rhtml +++ b/app/views/news/index.rhtml @@ -12,7 +12,7 @@ <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/new.rhtml b/app/views/news/new.rhtml index 9208d8840..a4d29a0a9 100644 --- a/app/views/news/new.rhtml +++ b/app/views/news/new.rhtml @@ -5,7 +5,7 @@ <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml index cc9fe1fbb..78be9c247 100644 --- a/app/views/news/show.rhtml +++ b/app/views/news/show.rhtml @@ -15,7 +15,7 @@ <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <%= link_to_remote l(:label_preview), - { :url => { :controller => 'news', :action => 'preview' }, + { :url => { :controller => 'news', :action => 'preview', :project_id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('news-form')" |