Question: ```
def create  
    @player = Player.create(player_params)
end

```

Why player\_params is showing "undefined local variable or method `player\_params' for #" ? 

**form:**

```
<%= form_for(@player) do |f|%>
<div class="field">
        <%= f.label :player_name%><br>
        <%=f.text_field :player_name%>
</div>

<div class="field">
    <%=f.label :price%><br>
    <%=f.text_field :price%>
</div>

<div class="field">
    <%= f.label :team_id%>
    <%= f.select(:team_id, options_from_collection_for_select(Team.all,     :id, :team_name),{prompt: 'please choose'}, class: "form-control")%>
</div>

<div class="actions">
<%= f.submit %>
</div>
<% end %>

```

Answer: 
What you've described is a typical approach for WinForms where achieving a real separation of UI and logic is not possible as the application is driven by events hooked to specific controls.

However, in WPF you do not use (or don't have to use) events for the communication between UI and the application logic. Main areas worth investigating for you are:

* [DataContext](https://stackoverflow.com/a/7262322/3330348)
* [Binding](http://www.scottlogic.com/blog/2012/04/20/everything-you-wanted-to-know-about-databinding-in-wpf-silverlight-and-wp7-part-two.html)

Very broad overview is that the XAML describes the layout and specifies where the layout should get data from. Proper data are present in the data context and the WPF engine is responsible for all the wiring (or the *binding*).

```
<TextBlock Text="{Binding Caption}" />

```

For instance in the code above the `Text` in the `TextBlock` will be populated with the value stored in the `Caption` property in the data context. (Usually the data context is specified on the level of a user control or user window.)
In the code behind there is nothing that is related to the TextBlock or to populating it with the values. 

What you will find in the code behind usually is only initialization of the `DataContext`:

```
public partial class MyUiClass
{
    public MyUiClass()
    {
        this.Loaded += (sender, e) => { this.DataContext = new MyViewModelClass(); }
    }
}

```

All the data are stored in the class set as a data context (MyViewModelClass in the example above).

As a next step I would recommend to go through some MVVM tutorials (there is quite a few good ones on YouTube).
There is something wrong in architecture you're talking about. 
You don't need *names of control* in the model data. The only thing model data interacts with are events/commands. In that way you have a separation between presentation and data where the model view is a bridge between those two.