How exactly do I create separate pages while still able to user info from controller and model?
For example, I want to have separate pages but still using the same info from the products controller.
views/product/order.html.erb
Yet when I add a simple_form_for I get an error
<%= simple_form_for(@products) do |f| %>
Basically all I'm trying to have is a separte page to submit info for the product. If not I'd gladly be happy to do it within the same page and have a revolving simple_form like this without having to create multiple pages.
http://malsup.com/jquery/cycle/
Example:

products_controller.rb
class ProductsController < ApplicationController
before_action :set_product, only: [:show, :edit, :update, :destroy]
def index
@products = Product.where(availability: true)
respond_with(@products)
end
def show
end
def new
@product = Product.new
end
def edit
authorize! :manage, @product
end
def create
@product = current_user.products.new(product_params)
@product.save
respond_with(@product)
end
def update
authorize! :manage, @product
respond_to do |format|
if @product.update(product_params)
format.html { redirect_to @product, notice: 'Product was successfully updated.' }
format.json { render :show, status: :ok, location: @product }
else
format.html { render :edit }
format.json { render json: @product.errors, status: :unprocessable_entity }
end
end
end
def destroy
authorize! :manage, @product
@product.destroy
respond_to do |format|
format.html { redirect_to products_url, notice: 'Product was successfully destroyed.' }
format.json { head :no_content }
end
end
@productsin<%= simple_form_for(@products) do |f| %>?