Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ruby on Rails for beginners

33,851 views

Published on

Introduction to Ruby and Introduction to Ruby on Rails basic concepts for beginners. The google presentation is even better in full screen https://docs.google.com/presentation/d/1EE0VuB_PkD2-8j5JNs6CUQHb4J9ToIgC7-IxYTojiS0/pub?start=false&loop=false&delayms=3000#slide=id.p

Published in: Software, Technology
  • I'd advise you to use this service: ⇒ www.HelpWriting.net ⇐ The price of your order will depend on the deadline and type of paper (e.g. bachelor, undergraduate etc). The more time you have before the deadline - the less price of the order you will have. Thus, this service offers high-quality essays at the optimal price.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download Full EPUB Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download Full doc Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download PDF EBOOK here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download EPUB Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... Download doc Ebook here { https://redirect.is/fyxsb0u } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I think you need a perfect and 100% unique academic essays papers have a look once this site i hope you will get valuable papers, ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Writing a good research paper isn't easy and it's the fruit of hard work. For help you can check writing expert. Check out, please ⇒ www.HelpWriting.net ⇐ I think they are the best
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • My brother found Custom Writing Service ⇒ www.HelpWriting.net ⇐ and ordered a couple of works. Their customer service is outstanding, never left a query unanswered.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Ruby on Rails for beginners

  1. I am Vysakh. I am a web developer.
  2. In Ruby puts “Hello world”
  3. Ruby is simply simple Just like english
  4. Variables
  5. You have - basket A with 10 apples - basket B with 20 apples. Find the sum and difference
  6. basketa = 10 apples basketb = 20 apples sum = basketa + basketb => 10 + 20 = 30 difference = basketb - basketa => 20 - 10 = 10
  7. basket_a = 10 basket_b = 20 sum = basket_a + basket_b difference = basket_b - basket_a In Ruby
  8. It is just like what you wrote in your kindergarden answer sheet
  9. Creator of Ruby - Matz
  10. Running the code
  11. Ruby is executed line by line So output of a single line/logic can be seen using irb
  12. Opening up irb in the terminal Instead of executing as a program file. Useful for learning, debugging.
  13. Conditionals
  14. cold_weather = true if cold_weather puts “Wear something warm” else puts “Don’t wear something” end Ruby code
  15. Most thing in Ruby is Object
  16. 2.odd?() => false “Vysakh”.length() => 6
  17. Brackets are optional in Ruby 2.odd? => false “Vysakh”.length => 6
  18. Exercise 1 a) Get a string and check if it is palindrome. b) Get a number and print the reverse of it. Hint: use gets to get the input.
  19. Array/List
  20. In Ruby shopping = [ “milk”, “cheese”, “olive oil”]
  21. Loops
  22. In Ruby 20.times do puts “I must do my homework” end
  23. Also, there are - loop - while loop - for loop - step - upto
  24. HAPPY Ruby is all about making programmer
  25. Mam, please take each item for me to bill
  26. cart = [“biscuit”, milk”, “shampoo”, “tampons” ]
  27. Mam, please take each item for me to bill cart = [“biscuit”, milk”, “shampoo”, “tampons” ] cart.each do |item| puts item end
  28. Exercise 2 - Create an array of marks you got in your last assessment. - Find if the sum of odd numbers is greater than the sum of even numbers, if it is, you have big odds at passing. - Pass this information or bad luck will follow
  29. HASH
  30. In Ruby slang = { “lol” => “laugh out loud”, “brb” => “Be right back” } slang[“lol”] => laught out loud
  31. Use symbols instead of string slang = { :lol => “laugh out loud”, :brb => “Be right back” } slang[:lol] => laught out loud
  32. Symbols in Ruby :hand.class => Symbol
  33. Alternate way to write hash slang = { lol: “laugh out loud”, brb: “Be right back” } slang[:lol] => laught out loud
  34. Exercise 3 - Create a list of ipl team hashes - with batsmen (3) name as key and their sixes as values. a) Find the sixes hit by a batsmen of a given name
  35. Functions
  36. In Ruby def y(x) x**3 end y(3) # => 27 y(2) # => 8
  37. Exercise 4 a) Create a method rajini_style. Return his dialogue (your favorite). b) Create a factorial method that gets a number and returns the factorial
  38. Class
  39. class Sports def initialize(players, name) @no_of_players = players @name = name end end cricket = Sports.new(11, “Cricket”) foot_ball = Sports.new(11, “Football”)
  40. Inheritance
  41. a version manager (RVM or rbenv or other) Install ruby using
  42. rbenv Installing Ruby using
  43. Installing and setting Ruby
  44. dhh Creator of Ruby on Rails
  45. Installing Rails
  46. Creating a new rails project
  47. Files generated with “rails new myproject” command
  48. Starting Rails server
  49. Check the browser localhost:3000
  50. Understanding Rails
  51. A dress shop Pant section? 1st floor kid. 2nd section
  52. 1st floor here is your pant
  53. A Rails server /about routes.rb home controller, about action
  54. A Rails server home controller, about action here is your html file
  55. Lets do it in Rails
  56. filename: config/routes.rb Configure the routes to get /about
  57. The corresponding html
  58. and go to ‘/about’ url Lets open the browser
  59. available in the section? When the pant is not Coming back to the kid and pant story
  60. 1st floor I want this specific design Godown Oh kid lemme go to the godown and get
  61. In Rails Database home controller, about action /posts/1
  62. and have an abstraction(model) Lets create a table
  63. This will create model, migration files
  64. migration - A ruby file that will create, modify tables posts table title column of type string
  65. from the ruby file(migration) Lets create the tables
  66. Rake, a simple ruby build program with capabilities similar to make This creates the posts table
  67. table records through Rails model Lets create, manipulate
  68. Post is a Ruby class that Inherits ActiveRecord app/models/post.rb
  69. Object Relation Mapping(ORM) layer Active Record is an
  70. tables map to classes,
  71. rows map to objects rows map to objects Rows map to objects Columns map to object attributes
  72. Few operations
  73. Lets use this query in Rails controller and give it to the user
  74. Configure the routes file
  75. Open up the browser
  76. Show the title, description in html app/views/show.html.erb
  77. Now lets check the browser
  78. Now lets do all this in one command -> scaffold
  79. This will generate all files based on REST Architecture
  80. Guides and resources
  81. http://tryruby.org http://www.codecademy.com/en/tracks/ruby http://ruby.learncodethehardway.org/book/ Ruby
  82. Ruby on Rails railstutorial.org/book railsforzombies.org guides.rubyonrails.org/getting_started railscasts.com
  83. Local Ruby Community - chennair.b Mailing list - google groups Meetups - www.meetup.com/chennai-ruby

×