Create a Basic API with Ruby on Rails - Part 1 - Returning JSON Data

Sdílet
Vložit
  • čas přidán 11. 02. 2021
  • PART 1 - Returning JSON DATA
    Welcome to a new ongoing tutorial mini-series dedicated to building an API-driven Ruby on Rails application.
    The goal of this series is to give some perspective of what it's like building a backend API that can talk to multiple applications no matter the platform.
    I plan to discuss topics like returning data to a client, routing, versioning, authentication, and more.
    Read the full blog post here: web-crunch.com/posts/create-a...
    =======
    Hi, My name is Andy Leverenz and I work as a product designer and developer. For fun, I design, code, and write. Check out my blog called Web-Crunch web-crunch.com where I publish design and development tutorials with the occasional vlog.
    ♥️ Sponsor me on GitHub
    github.com/sponsors/justalever
    ☕️ Keep me awake. Buy me a coffee
    www.buymeacoffee.com/webcrunch
    📰 One-Click Subscribe:
    czcams.com/users/webcrunc...
    💻 Previously published at:
    web-crunch.com/posts/create-a...
    👋 Latest Course: HELLO HTML & CSS (coming soon)👋
    hellohtmlcss.com
    💎Ruby on Rails Course: HELLO RAILS
    hellorails.io
    💻 Check out the blog:
    web-crunch.com
    🦄 Check out my personal site:
    justalever.com
    🚀 Links:
    Weekly Newsletter: digest.web-crunch.com/
    Twitter: / webcrunchblog
    Github: github.com/justalever
    📘Check out my book on UX Design:
    "LUXD: Learn User Experience Design"
    web-crunch.com/products/luxd
    📙 Check out my FREE book on Tumblr Theming:
    "Pro Tumblr Theming"
    web-crunch.com/products/ptt

Komentáře • 15

  • @pedrocxbx
    @pedrocxbx Před 3 lety +3

    Great content, thanks for sharing Andy!

  • @rustam_tolipov
    @rustam_tolipov Před 2 lety +3

    I love the theme which you are using in VS Code!

  • @adrienbenaceur4805
    @adrienbenaceur4805 Před rokem +1

    Awesome video !

  • @jl_woodworks
    @jl_woodworks Před 3 lety +1

    Very nice. Insane you don't have more views.

  • @aleksandrtarasov8631
    @aleksandrtarasov8631 Před 2 lety

    thanks!

  • @anuj5857
    @anuj5857 Před 2 lety

    Good

  • @TheCardboardWorkshop
    @TheCardboardWorkshop Před rokem +1

    Thank you for your tutorial. I wonder which extension that helps you type so fast?

    • @Webcrunch
      @Webcrunch  Před rokem +1

      I think you're looking for Emmet which autocompletes some different languages 👍

  • @rcolon85
    @rcolon85 Před 2 lety +2

    Thanks for this tutorial! Hey I have a question, after I migrate after creating the first book. I can't see anything on the localhost:3000 ? I've created an api before with localhost:3000/api/v1/ and get a response on postman but when I follow the steps I cant get anything back. What could it be?

    • @rcolon85
      @rcolon85 Před 2 lety +3

      Edit: Got it, had to reboot rails server

  • @jackepner9984
    @jackepner9984 Před rokem

    It looked like it was added to git without any commands... how did you set that up?

  • @Pelu6cuerdas
    @Pelu6cuerdas Před rokem

    Is it possible to only show certain data in, for example, the index action of the controller and other data in the show action? I want to show more detailed info in show, but with the serializer is always the same

    • @Pelu6cuerdas
      @Pelu6cuerdas Před rokem

      I resolved it. You can create custom serializations!

  • @marcosporto7489
    @marcosporto7489 Před rokem

    Awsome video. But i dont know why, bur the --api command doesn't works on may rails 6.1.7. Doens not creates any API controllers or JSON renderings, e etc.. It creates a rails full app. Dont know what to do.. anyone please?

    • @iamjustine1
      @iamjustine1 Před rokem

      maybe you forgot the scaffold part. Once you created the app using --api, there will be no generated api controller or json yet, unless you scaffold. you can also generate your own controller "rails g controller " then you can start your actions