Devchat.tv Episode Roundup

Devchat.tv Episode Roundup

Download on the App Store

All Devchat.tv Episode Roundup episodes

  • Many to Many Associations in Ruby on Rails – A Teach Me To Code Tutorial
    I had several requests in UserVoice to provide a Many to Many tutorial in Rails. This is a demonstration of how to put together a "has and belongs to many" association and a "has many through" association.
    This is somewhat basic to Ruby on Rails, but important if you need to associate different models.
    Download 161.3 MB
    Download iPhone & iPod 97.7 MB
    0 min
  • Many to Many Associations in Ruby on Rails – A Teach Me To Code Tutorial
    I had several requests in UserVoice to provide a Many to Many tutorial in Rails. This is a demonstration of how to put together a "has and belongs to many" association and a "has many through" association.
    This is somewhat basic to Ruby on Rails, but important if you need to associate different models.
    Download 161.3 MB
    Download iPhone & iPod 97.7 MB
    0 min
  • Ruby on Rails Routing
    Ruby on Rails routing can be a little confusing. Here are some of the high points.
    The root path is specified by the 'root' method. It matches the '/' path and behaves like 'match'.
    The 'match' method will match the requested path to the string passed to match and route to the controller and action specified.
    # Sends requests to /users/list to PeopleController#index
    match "users/list", :to => "people#index"
    You can also extract variables from the path.
    # Matches /user/1/edit and passes '1' in params[:id]
    match "users/:id/edit", :to => "users#edit"
    You can specify which HTTP request methods are valid for a route.
    get "users/index"
    match "users/index", :to => "users#index", :via => :get
    You can also name a route and use the related helper methods.
    match "users/index", :to => "users#index", :as => "user_index"
    #In some controller or view
    user_index_path
    # => "/users/index"
    user_index_url
    # => "http://localhost:3000/users/index"
    You can also create RESTful resources around a model. See the Rails Guides for details.
    resource :user
    Finally, you can add to a RESTful resource when needed.
    # allows you to post to '/users/1/make_admin' and get '/users/show_admins'
    resource :user do
    post :make_admin, :on => :member
    get :show_admins, :on => :collection
    end
    12 min
  • Know Your Text Editor – Teach Me to Code Podcast

    Over the last few weeks I've been using macvim and janus to write code. The more I learn about VIM, the more I love it.

    It's not so much that VIM does things that I find particularly natural or “better”, but rather it's that it's extremely powerful for opening, managing, and editing files. Each little trick I get brings me more and more to the place where I can code as fast as I can think.

    The Pragmatic Programmer(book affiliate link) tells us to know our text editors. The more I get to know about my text editor, the better off I am.

    16 min
  • Acceptance Tests with RSpec and Capybara
    On the Ruby Rogues podcast I mentioned that I had moved away from Cucumber to RSpec and Capybara for my integration tests. Here's a demo on how to do some TDD with RSpec and Capybara.
    Download 180.6 MB
    Download iPhone & iPod 109.2 MB
    28 min
  • Acceptance Tests with RSpec and Capybara
    On the Ruby Rogues podcast I mentioned that I had moved away from Cucumber to RSpec and Capybara for my integration tests. Here's a demo on how to do some TDD with RSpec and Capybara.
    Download 180.6 MB
    Download iPhone & iPod 109.2 MB
    28 min
  • Acceptance Tests with RSpec and Capybara
    On the Ruby Rogues podcast I mentioned that I had moved away from Cucumber to RSpec and Capybara for my integration tests. Here's a demo on how to do some TDD with RSpec and Capybara.
    Download 180.6 MB
    Download iPhone & iPod 109.2 MB
    28 min
  • Rails Engines
    Rails Engines are a terrific way of mounting on Ruby on Rails application into another.
    A Rails Engine is basically a Rails application with an Engine class installed. The main application—the application your engine is mounted into—uses the generators, rake tasks, and routes from engines automatically. As of Rails 3.1, rake tasks are provided to move migrations and assets into the main application.
    You can use Engines to add features to your current application or you can use it to provide an entire section of your website.
    10 min