Hi there. I'm a newbie to RoR but I managed a year ago to put up a Rails site at:
www.rockworksstudio.fi.
Click WEB-STUDIO LOGO on that page!
I'm trying to continue from where I left off year ago and I have some issues (probably minor and easy to You) on building up / updating my
SQLite3 database file
/db/development.sqlite3.
I managed to do it year ago somehow but I have no clue about that anymore. I just know that the TEXTS on that website of mine (behind those links at the bottom area of the page) come from that
development.sqlite3 file.
Also I'm confused about the contents of the
routes.rb file - sample of which is below:
Code:
...
get 'page/show'
get '/Etusivu' => 'page#show', :id => 1, as: 'etusivu'
get '/Esittely' => 'page#show', :id => 2, as: 'esittely'
get '/Palvelut' => 'page#show', :id => 3, as: 'palvelut'
get '/Galleria' => 'page#show', :id => 4, as: 'galleria'
get '/Linkit' => 'page#show', :id => 5, as: 'linkit'
get '/Tarjous' => 'page#show', :id => 6, as: 'tarjous'
get '/Palaute' => 'page#show', :id => 7, as: 'palaute'
get '/Forum' => 'page#show', :id => 10, as: 'forum'
root 'page#show', :id => '2'
...
So those Routes are for the links at the bottom of the website - like a link with
ie. id 3 points to the PALVELUT (services) content (that is loaded dynamically inside the text area in the middle of the webpage).
But I cannot remember how I have used this
"id => *" thing to route the links to the right text content, since even if the website works now (somewhat) I cannot find the original text contents from anywhere. Nor know how to edit/enable this ID's..
Only the
development.sqlite3 file has those texts among the code, but I can't remember how I originally got them there. With some kind of an SQLite3 editor?? I don't remember...
Here is a sample from the
application.html.erb file:
Code:
...
<div class="wrapper-content">
<div class="content">
<%= yield %>
</div>
</div>
...
...so this
<%=yield %> thing there.. I'm not sure but I suppose it fetches ALL the content targeted inside that inner DIV also from that database? At least I cannot find even the original data from anywhere.. No .erb files nor nothing.. Yeah, I know; pathetic!
This bad memory really is a drag.. I truly hope that You can help me! I will post whatever You need more info about.
Thank You.
PS. I tried "out of cold" just to remotely execute the command
"rake db:reset db:migrate" but it only rendered those "
id => 3, 4, 5 etc." links in
ROUTES.DB file broken (got the routing error) so this RAKE command seems not be able to build the database as before, since I guess there must be some original files missing or..? I just don't remember/know. :'(