#Concrete 5 gidsje ##Intro Je begint met het maken van een aantal vasste elementen:
- Themanaam
- default.php
- description.txt
- thumbnail.png
- assets
Step # 1: Add a Linux/UNIX user called tom
Type the following commands to create a UNIX/Linux user called tom:
# adduser tom
# passwd tom
Step # 2: Becoming a superuser
You need to login as database super user under postgresql server. Again the simplest way to connect as the postgres user is to change to the postgres unix user on the database server using su command as follows:
#Using Document ready with turbolinks Normaly you would type these coffescript lines when using code that should run after the document finished loading.
$(document).ready ->
your code here
But in new versions of rails the header of the application's layout view has this script linked: data-turbolinks-track
. When you click links with this page value set to true, the currently loaded page get's filled with new content instead of a new page loading. this saves time in requesting pages and their default assets. but re-appending content does not trigger '$(document).ready ->'. It will however restart every javascript and read all the lines and functions again. That's why we are going to change some values at the top and add some to the bottom.
ready = ->
Your code here
If you experimented with Devise in Rails 4 recently and tried to edit or create accounts in the devise gem with extra values like name
, phone
and avatar
you must have seen that Rails 4 silently ignores the extra fields you inserted in your forms.
When you tried atrr_accesible
in your model your rails app wouldn't even start or would leave you with screens of errors.
This is because Rails 4 uses a new kind of attr_accesible
where you have to define all accessible or now called "required" values for each method they should be accessible from.
when defining for example your edit field you should add an extra line"
params.require(:model).permit(:extra_field1, :extra_field2)
##In Devise
Door Peter van der Meulen
www.picoreclame.nl
#Inhoudsopgave
#Install Ubuntu with Rails on your developement machine Need to get Rails (4.0.0) running on your ubuntu pc, or are you tired of making rails applications in windows? Follow my guide below to get your own ubuntu developement pc running.
##installing Linux
Download Ubuntu desktop from www.ubuntu.com and install this to a computer.
#Ultimate Ubuntu Git console #instructions
ctrl + alt + T
or selecting it from your applications listgedit ~/.bashrc
##Customisation
Line numbers in the description should be shown in relation to the code
file
# add SSH scripts to powershell | |
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin" | |
# add sublime to powershell | |
Set-Alias subl 'C:\Program Files\Sublime Text 2\sublime_text.exe' |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59 |