I've searched through the questions and couldn't find an answer that would work for me and I'm new to Rails and am stuck. I'm trying to render a simple_form I use to post statuses into a view for user profiles. But every time I load the profile page I get the following error:

undefined method `model_name' for NilClass:Class

Extracted source (around line #1):

1: &lt;%= simple_form_for(@status) do |f| %&gt;


I don't know why because it renders fine in two other views I have, only difference they are located in the same folder as the form. The profile is not. This is what I used to render the form:

&lt;%= render partial: "statuses/form", locals: { status: @status} %&gt;


and here's what my controller looks like:

class StatusesController &lt; ApplicationController

  before_filter :authenticate_member!, only: [:new, :create, :edit, :update] 

  # GET /statuses
  # GET /statuses.json
  def index
  @statuses = Status.all

    respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @statuses }
   end
  end

  # GET /statuses/1
  # GET /statuses/1.json
  def show
    @status = Status.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @status }
    end
  end

  # GET /statuses/new
  # GET /statuses/new.json
  def new
    @status = Status.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @status }
    end
  end

  # GET /statuses/1/edit
  def edit
    @status = Status.find(params[:id])
  end

  # POST /statuses
  # POST /statuses.json
  def create
    @status = current_member.statuses.new(params[:status])

    respond_to do |format|
      if @status.save
        format.html { redirect_to @status, notice: 'Status was successfully created.' }
        format.json { render json: @status, status: :created, location: @status }
      else
        format.html { render action: "new" }
        format.json { render json: @status.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /statuses/1
  # PUT /statuses/1.json
  def update
    @status = current_member.statuses.find(params[:id])
    if params[:status] &amp;&amp; params[:status].has_key?(:user_id)
        params[:status].delete(:user_id) 
    end 
    respond_to do |format|
      if @status.update_attributes(params[:status])
        format.html { redirect_to @status, notice: 'Status was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @status.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /statuses/1
  # DELETE /statuses/1.json
  def destroy
    @status = Status.find(params[:id])
    @status.destroy

    respond_to do |format|
      format.html { redirect_to statuses_url }
      format.json { head :no_content }
    end
  end
end


What am I missing here?


Question: How to increase difficulty in Dungeon World
Answer: Dungeon World puts difficult after the roll, not before.

There are two misunderstandings combining when someone wants to start fiddling with the mechanics to make Dungeon World harder (or easier).

These two assumptions that are true in many other games are false in Dungeon World:


The roll is to determine success or failure.
Mechanical difficulty is assigned ahead of the roll based on the situation.


In another game, you might do this:


  DM: "Jumping the chasm is a Hard check. Roll to see if you succeed."
  
  
  Success: "You leap the chasm and land safely on the other side."
  Failure: "You fall!" (rolling) "You suffer 23 damage from the fall. You're lying in a shallow stream at the bottom of the chasm."
  


This is not how Dungeon World works.

In Dungeon World, the corresponding truths are:


The roll is to determine whether the GM gets to make a move as well.
Difficulty is determined after the roll, but only by the GM's choice of narration.


In Dungeon World, what happens is more like this:


  DM: "Jumping the chasm is dangerous, how are you going to defy that danger?"
  Paladin: "I'm going to take a running start and put my all my strength into it."
  DM: "That sounds like Defying Danger by Powering Through, roll plus strength."
  
  
  Hit: "You leap the chasm and land safely on the other side."
  (no GM move)
  Partial hit: "You go to leap the chasm and then pull up short. You can feel that you're just not going to make it with your panoply of plate. You can remove your amour and leave it on this side and make the leap no problem. What do you do?"
  (executing the 7&ndash;9 result of Defy Danger: the PC hesitates and the GM offers an ugly choice)
  Miss: "You leap the chasm, but only just. You slam into the far edge and barely manage to grab on to stop yourself from plummeting. Ranger, you can tell that Paladin is stuck, unable to pull herself up due to the weight of her plate armour. She's slipping, what do you do?"
  (GM move: put someone in a spot, along with the advice to move the spotlight around)
  


Let's unpack that.

First, there is no success or failure, just hits and misses. Both hits and misses need to be translated through the rules and some more choices first, before you can judge subjectively whether the outcome was a success or a failure.

Hits of either kind always become fundamentally successes, but only after you follow the move's rules, and we don't know about misses until the GM makes their move. The success of a partial hit can carry consequences that can hurt enough that it's still a success, but a Pyrrhic one. We always follow the rules of the moves to find out what happens exactly first, we don't just say "yay, you did what you were trying to."

For misses, we need another step of transmutation before we learn about success or failure: the GM move. Most GM moves are some kind of consequence that is tangential to what the PC was trying for: losing things, getting split up, being caught in a bad spot, noticing a temptation, etc. None of those moves say "you fail", so when the GM makes those moves, she can say that you succeeded at your main intent anyway. The only time the GM has to say you failed at your intent is when she picks a GM move that has in-game effects incompatible with whatever the PC was attempting to achieve. If the GM is making a soft move, succeeding at the original task is one of the ways of making a GM move softer. If the GM is making a hard move, then failure is likely part of the package. Success and failure, then, depend on what the in-game effect of the GM's move is. The miss isn't the failure, it's the consequences of the move the GM chooses.

Second, mechanical difficulty isn't determined before the roll. Instead, the situation has already been set up using soft (or sometimes hard) GM moves in response to the players declared what they're doing, saying, and looking at, and whatever else is happening at the same time. That sets the in-game difficulty of the situation, but the difficulty only gets applied to the task at hand after the roll, and only on a miss or if the move's rules says the GM gets to add something unfortunate. On a success, the difficulty simply didn't matter.

Defy Danger seems like an exception to this because it often happens before other moves, but it's not. The GM can't just call for Defy Danger on a whim, it has to be because the PC is doing something that puts them in danger&mdash;so it triggers independently of the GM's wishes, based on the fair judgement of the situation instead, just like every other move. It's the choice to do something that exposes them to danger that increases the difficulty, not the GM deciding it should be harder and assigning a mechanical modifier.

When a player declares their PC is attempting something that matches a move without exposing themself to danger first, the group just does what the move says. There is no difficulty involved at first. The roll is made, and a hit means they did what they were trying to do, easy as pie. Only when the roll gives the GM an opportunity to make a move, or to say something as part of the move's instructions, does the GM bring difficulty into the picture after the fact. If the roll "should" have been harder in some other system, now is the time to show just how hard it was by using a hard move to show the hard consequences of the risks taken. If the roll "should" have been easy, now is the time to show that it was easy by making a soft, kind move that might even include success, despite the miss.

A quick example might help demonstrate the difference: Imagine the Fighter is Hack &amp; Slashing against an orc, and misses. The GM chooses a move that follows (a GM principle), choosing to have the Fighter slip and go to one knee as the orc grins and winds up for a strong overhand chop (soft move: show signs). Now imagine the Fighter is Hack &amp; Slashing against a roper (a toothy tentacle monster), and misses. The GM chooses a move that follows, choosing to have the Fighter grabbed and pinned by three wrapping tentacles (hard move: put them in a spot). That's much worse! Fighting the roper is harder than fighting an orc, but it's harder because it's more dangerous when the Fighter messes up, not because of plusses or minuses.

This actually goes for hits too: even when you roll a hit, what you were trying to do... maybe that actually makes your life harder, and you did that all by yourself without the GM's help. Again, it's the situation caused by the result of the chain of moves that makes things harder or easier after the roll. That's not something that could be modelled by a bonus or penalty to the roll anyway, but it neatly flows from the non-bonus-based difficulty rules of Dungeon World.