Note that there are some explanatory texts on larger screens.

plurals
  1. POpass parameters with ror
    primarykey
    data
    text
    <p>i trying to pass parameter from one site to the next site and use it but i have a problem!</p> <p>store>index </p> <pre><code>&lt;h1&gt;All Priorities&lt;/h1&gt; &lt;% @buildings.each do |building| %&gt; &lt;div class="entry"&gt; &lt;div class="img"&gt; &lt;%= image_tag (building.photo.url)%&gt;&lt;/div&gt; &lt;div class=" disc"&gt; &lt;h3&gt;Name of the Bulding: &lt;%= building.title %&gt;&lt;/h3&gt; &lt;h4&gt;Status: &lt;%= building.status %&gt;&lt;/h4&gt; Info: &lt;%=sanitize(building.description)%&gt; &lt;div class="price_line"&gt; &lt;span class="price"&gt;Price: &lt;%= sprintf("€ %0.02f",building.price)%&gt;&lt;/span&gt;&lt;br/&gt; &lt;div class="button"&gt; &lt;%= button_to "I Want to See it", new_seeit_path(building.id), :method =&gt; :get%&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;%end%&gt; &lt;div class="pages"&gt; &lt;%= will_paginate @buildings %&gt;&lt;/p&gt; &lt;/div&gt; </code></pre> <p>in the next site when i press the button i want to see it it says :</p> <pre><code>http://localhost:3000/seeits/new.4? </code></pre> <p>and does not open the page</p> <p>if i remove the (building.id) it says :</p> <pre><code>http://localhost:3000/seeits/new? </code></pre> <p>it takes me to the next site but without param</p> <p>views>wish_receive.text.erb &lt;= this send me those info on email</p> <pre><code>You got a wish from &lt;%= @seeit.name %&gt; &lt;%= @seeit.telephone_number %&gt; &lt;%= @seeit.email %&gt; &lt;%= @seeit.comments %&gt; </code></pre> <p>routes</p> <pre><code>Projectproperties::Application.routes.draw do resources :seeits get "about/index" get "contact/index" get "store/index" resources :buildings root :to =&gt; 'store#index', :as =&gt; 'store' end </code></pre> <p>seeits_controller</p> <pre><code>def new @seeit = Seeit.new respond_to do |format| format.html # new.html.erb format.json { render json: @seeit } end end # GET /seeits/1/edit def edit @seeit = Seeit.find(params[:id]) end # POST /seeits # POST /seeits.json def create @seeit = Seeit.new(params[:seeit]) respond_to do |format| if @seeit.save Notifier.wish_received(@seeit).deliver format.html { redirect_to(store_url, notice: 'Thank you for your wish will contac you very soon.') } format.json { render json: @seeit, status: :created, location: @seeit } else format.html { render action: "new" } format.json { render json: @seeit.errors, status: :unprocessable_entity } end end end </code></pre> <p>rake routes command</p> <pre><code> seeits GET /seeits(.:format) seeits#index POST /seeits(.:format) seeits#create new_seeit GET /seeits/new(.:format) seeits#new edit_seeit GET /seeits/:id/edit(.:format) seeits#edit seeit GET /seeits/:id(.:format) seeits#show PUT /seeits/:id(.:format) seeits#update DELETE /seeits/:id(.:format) seeits#destroy about_index GET /about/index(.:format) about#index contact_index GET /contact/index(.:format) contact#index store_index GET /store/index(.:format) store#index buildings GET /buildings(.:format) buildings#index POST /buildings(.:format) buildings#create new_building GET /buildings/new(.:format) buildings#new edit_building GET /buildings/:id/edit(.:format) buildings#edit building GET /buildings/:id(.:format) buildings#show PUT /buildings/:id(.:format) buildings#update DELETE /buildings/:id(.:format) buildings#destroy store / store#index </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload