Today we released a new version of Learn to the App Store, which adds the most frequently requested feature, iPad support!
Additionally, this release includes several improvements on both iPhone and iPad. Resources that are available as iBooks can now be viewed in the iBookstore, better navigation controls have been added to web resources, and check-offs are now accompanied by sweet audio feedback.
If you would like to add resources to the Trail Map that the app uses, please contribute to the open source repository on GitHub.
Learn is available for free on the App Store, so try it out today!
Written by Diana Zmuda.
Besides moving attribute whitelisting to the controller rather than the model,
Rails 4’s move to
attr_accessible provides great documentation about the data with which
records are being created.
Here is an example of a controller many of us have written, using
class CommentsController < ApplicationController respond_to :html def create @comment = Comment.create(comment_params) respond_with @comment end private def comment_params params. require(:comment). permit(:body). merge(user: current_user, commentable: commentable) end def commentable # find and return a commentable record end end
Notice how the
comment_params method tells you at a glance what object’s
parameters this controller/action cares about (
comment), the specific data
being used (
body), and the extra information being added. After glancing at
the method, you hardly have to concern yourself with the rest of the class:
everything just makes sense.
strong_parameters will be standard in Rails 4.0, but they can be used now in
Written by Caleb Thompson.
Winter is finally over, spring is here, and thoughtbot folks have flown in from Boston, San Francisco, Stockholm, and Boulder to be at RailsConf 2013!
Do you have any questions about our open source projects? Do you need some help setting up your project on Trajectory, or do you want to Learn something? We would love to chat with you!
We’re also setting up a temporary studio for our podcast in room D136. Feel free to stop by to say hi and watch us record live!
Adarsh Pandit, Ben Orenstein, George Brocklehurst, Harlow Ward, and Prem Sichanugrist are giving talks:
Tuesday at 11:30am: TDD Workshop: Outward-in Development, Unit Tests, and Fixture Data
Tuesday at 12:20pm: TDD Workshop: Mocking, Stubbing, and Faking External Services with Harlow Ward and Adarsh Pandit:
thoughtbot are creators of the open-sourced testing tools FactoryGirl and Shoulda Matchers.
We recognize Test-Driven Development (TDD) can be difficult to practice as features increase in complexity. Testing is often skipped when developers feel uncomfortable with TDD or have not yet seen certain approaches in practice.
We’ll describe specific techniques used in TDD which touch on: Integration testing with RSpec+Capybara, Model Associations and Data Validations, Asynchronous Jobs, Emails, 3rd Party Services, and JSON API endpoints.
Tuesday at 2:00pm: Sleeping with the enemy with George Brocklehurst:
In this session we’ll go off the Rails and take a look at what our Pythonista cousins are doing with Django.
I’ll start with some live coding: recreating DHH’s infamous 15 minute blog demo using Django and explaining the building blocks of a Django app along the way. I’ll then take that app and use it to look at some design decisions Django makes, and how they compare to Rails. You’ll see convention over configuration in places you didn’t expect it, why Django doesn’t need attr_accessible or strong parameters, and how the template method pattern could change your life.
Why talk about Python at a Rails conference? Seeing another way of doing things forces us to think about what we’re doing, challenges or validates the assumptions we make about our work, and inspires us to try new things.
Wednesday at 2:00pm: Zero-downtime payment platforms with Prem Sichanugrist and Ryan Twomey (from LevelUp):
When you’re building a payment platform, you want to make sure that your system is always available to accept orders. However, the complexity of the platform introduces the potential for it to go down when any one of the moving parts fails. In this talk, I will show you the approaches that we’ve taken and the risks that we have to take to ensure that our platform will always be available for our customers. Even if you’re not building a payment platform, these approaches can be applied to ensure a high availability for your platform or service as well.
Thursday at 10:30am: How to Talk to Developers with Ben Orenstein:
Nearly every developer will be asked to present to his or her peers at some point. Those that do it well will tend to have an outsized influence on their team, company, and community.
This talk will demonstrate (mostly by example) the straightforward techniques for giving excellent presentations, from a veteran conference speaker and teacher. Topics to cover include:
- Phrases that turn your audience against you.
- Basic body language tips that affect perception.
- How to be more interesting than the internet.
- The power of live coding and demos.
- Being funny without resorting to reddit memes.
- How to get plenty of questions during Q&A.
- How to get an unfair amount of talk acceptances (aka ‘Bribing conference organizers’).