background preloader

Ruby on Rails: Download

Ruby on Rails: Download
Related:  juan144RAILS STUFF

fagga/transmission-remote-cli - GitHub quot;Knitting Stitch Patterns" There are many ways to combine stitches to create different patterns, but the basis of every pattern is the knit stitch and the purl stitch. Garter Stitch (g st) Knit every row in flat knitting, and you have garter stitch (fig. 10). It's a great stitch pattern for new knitters because it uses only one simple stitch. Stockinette Stitch (St st) This is the most commonly used stitch pattern. The knit side (the smooth side) is called stockinette stitch (fig. 11a), and the purl side (or bumpy side) is called reverse stockinette stitch (fig. 11b). Ribbing (rib) You'll recognize ribbing as the stitch found at the cuffs and hems of sweaters. The single rib is made by alternating one knit stitch with one purl stitch (abbreviated as k1,p1). The most important thing to remember when making ribbing is that the yarn must be brought between the needles to the back of the work for the knit stitches and brought between the needles to the front of the work for the purl stitches.

Change data in migrations like a boss – Rails Guides Changing data on change database schema in production is a common problem for Rails developers. Assume that you have a Rails project. Some day you decided to change the database schema and want to add some new column. Then you have to go through all your models and change actual data according this new schema. Currently there are solutions to overcome this. Solutions with disadvantages There are many solutions to avoid the issue. Writing code in migrations without caution Duplicate classes in migrations Writing raw SQL in migrations Using seeds Other methods Now let’s look at all of them one by one and see what are problems have these solutions. Writing code in migrations without caution Say we are going to add a column to a User model and then update all users in our database. class AddStatusToUser < ActiveRecord::Migration def up add_column :users, :status, :string User.find_each do |user| user.status = 'active'! Today this migration works without problems. Using seeds

RVM: Ruby Version Manager - RVM Basics $ rvm help # Documentation Index Wondering why you should use RVM? For a start, not only does RVM make installing multiple ruby interpreters / runtimes easy and consistent, it provides features such as gemsets that aren't typically supported out of the box on most ruby installs. RVM also lets you use different rubies in a manner that wont mess with your existing ruby install (unless you tell it to) as well as letting you run multiple different rubies in seperate terminals concurrently! Getting started First, you must ensure that you install RVM . Post Install Configuration The rvm installation documentation instructs you to put the following line at the very end of your bash profile: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . NOTE: This is for a user install. For those who are not very familiar with bash scripting, I will explain in the next few paragraphs what the line above does. [[ condition ]] evaluates the condition inside the double brackets and returns true or false. . $ type rvm | head -1

How to Substitute Yarns: Using your knitting math to replace yarns not in the pattern Sometimes creating a garment with the yarn called for in the pattern isn’t a possibility, and that can create problems in terms of reaching the right number of stitches in a pattern. However, all that is needed is some simple math to correct the problem, and here is how to do it. First, make a swatch according to the pattern's gauge. If the pattern says that 21 stitches by 28 rows will be 4"x4", but the swatch is too small (or too large) look on the label that came with your yarn, then knit a swatch according to what gauge is indicated. Then, a little bit of math is all you need to know to figure out your correct gauge and ratio. For example, the pattern calls for 21 sts x 28 rows, but you need to knit 25 sts x 32 rows in order to achieve your 4"x4" swatch. A ratio is the answer - and in order to do that some division is that’s required. Now that the stitches are done, what about the rows? Once again round up to 1.2. Now apply your math to the rest of your pattern. 50 x 1.2 = 60 rows

Rails Application Layout by Daniel Kehoe Last updated 3 August 2014 Rails application layout for HTML5. Shows how to set up an application layout with navigation links, messages for alerts and notices, and CSS styling for Rails. If You Are New to Rails If you’re new to Rails, see What is Ruby on Rails? What is the RailsApps Project? This is an article from the RailsApps project. Background The default application layout is where you put HTML that you want to include on every page of your website. Every Rails application needs a well-designed application layout. Rails will use the layout defined in the file app/views/layouts/application.html.erb as a default for rendering any page. HTML5 Boilerplate The well-known HTML5 Boilerplate project has been recommending “best practice” tweaks to web pages since 2010. Front-end Frameworks This article shows how to set up a simple application layout with navigation links, messages for alerts and notices, and CSS styling for Rails. Rails Layout Gem Rails Default Application Layout <!

Create A Repo If you've found yourself on this page, we're assuming you're brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way. Make a new repository on GitHub Every time you make a commit with Git, it is stored in a repository (a.k.a. More about repositories Git stores all of your project files in a repository. Click New Repository. Fill out the information on this page. Congratulations! Create a README for your repository While a README isn't a required part of a GitHub repository, it is a very good idea to have one. More about READMEs If you include a file with the filename "README" in your repository, it will automatically be shown on your repository's front page. Step 1: Create the README file In the prompt, type the following code: Open the new README file found in your Hello-World directory in a text editor and add the text "Hello World!" Step 2: Commit your README More about commits Step 3: Push your commit Celebrate

GitHub - plataformatec/simple_form: Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup. Set your user name, email and GitHub token To change your git email setting, use the git config command: git config --global ""# Set a new emailgit config --global Verify the setting# The command takes two args: setting name: user.emailnew email: The --global flag writes this setting into your global git config. Troubleshooting Commits on GitHub don't link to my account Make sure you've added the same email to your GitHub account settings. New commits aren't using the right email If git config reports the correct value for the repository you're viewing, but new commits are using the wrong email, you may have environment variables set that are overriding the setting. My old commits weren't changed This setting only affects future commits. Use git filter-branch to rewrite the repository history (see this guide) andForce-push the new history up Warning: It's considered bad practice to rewrite published history; you should only do this in an emergency. git config man page