app/controllers/phcpress/news/posts_controller.rb in phcpress-3.6.1 vs app/controllers/phcpress/news/posts_controller.rb in phcpress-3.7.0

- old
+ new

@@ -19,41 +19,41 @@ # Single News Post (/news/posts/1) #def show #end # Create a New News Post (/news/posts/new) - def new + def newW @news_post = News::Post.new end # Edit News Post /news/posts/1/edit def edit end # Create News Post /news/posts/new def create - @news_post = News::Post.new(news_post_params) + @news_post = News::Post.new(news_post_params)W @news_post.user_id = current_user if @news_post.save - redirect_to news_posts_path, notice: 'News post was successfully created.' + redirect_to news_posts_path, notice: 'News Article was Successfully Created.' else render 'new' end end # PATCH/PUT def update if @news_post.update(news_post_params) - redirect_to news_posts_path, notice: 'News post was successfully updated.' + redirect_to news_posts_path, notice: 'News Article was Successfully Updated.' else render :edit end end # DELETE def destroy @news_post.destroy - redirect_to news_posts_path, notice: 'News post was successfully destroyed.' + redirect_to news_posts_path, notice: 'News Article was Successfully Destroyed.' end private # Common Callbacks