E N D
Rails • Rails is a web application development framework written in the Ruby language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Experienced Rails developers also report that it makes web application development more fun.
DRY – “Don’t Repeat Yourself” – suggests that writing the same code over and over again is a bad thing. • Convention Over Configuration – means that Rails makes assumptions about what you want to do and how you’re going to do it, rather than requiring you to specify every little thing through endless configuration files. • REST is the best pattern for web applications – organizing your application around resources and standard HTTP verbs is the fastest way to go.
Code • No “;” needed. You do not need to explicitly finish each line with a semi-colon • You can also use “\” for continuation of a line • Example: something = longname + anotherlongname \ +z • something.method – easy to guess, what comes after the dot is a method call • curly brackets { } – these are most of the time an indicator of a block, • <% ruby code here %>
Example: blog • rails new blog • Go into application • cd blog • rails generate controller posts (also could add an “action”)
Problem in Windows 8 • First go to config/application.rb and disable the application pipline. • It looks like : config.assets.enabled = true and turn in to false config.assets.enabled= false