body { background-image: url(image.jpg); }
root 'students#index'To set the show page with id=7 as the root node:
root 'students#show', id: '7'
resources :students do collection do get :directory end end
View | Helper Method |
---|---|
index | students_path |
show | student_path(@student) or @student |
new | new_students |
edit | edit_student(@student) |
Prefix Verb URI Pattern Controller#Action students GET /students(.:format) students#index POST /students(.:format) students#create new_student GET /students/new(.:format) students#new edit_student GET /students/:id/edit(.:format) students#edit student GET /students/:id(.:format) students#show PATCH /students/:id(.:format) students#update PUT /students/:id(.:format) students#update DELETE /students/:id(.:format) students#destroy
a. <%= form_tag convert_display_path do %> Ans: <%= form_for @conv_rec, url: convert_display_path do |f| %> b. <%= text_field_tag :name %> Ans: <%= f.text_field :name %> c. <%= submit_tag 'Submit Data' %> Ans: <%= f.submit 'Submit Data' %>
session[:key] = "Important information"(You choose the key.)
info = session[:key]
session[:logged_in] = true
Product: cat_num title description image_url price Customer: last_name first_name address cc_type cc_num cc_exp ShoppingCart: customer_id LineItem: product_id shopping_cart_id quantityHere are some images and a seed file for Product. See the Depot1 Example.