RAILS SAVE IDS

I think, my method create is wrong in controller MALLA
I want to save the ids selected in the view malla from the controller
MALLA.

  def create
    params[:malla][:level][:subject_ids]
    @malla = Malla.new(params[:subject_ids][:level][:malla])
       if @malla.save
       redirect_to mallacurriculares_menu_principal_admin_path, :notice
=> 'MALLA CREATED'
     end
  end

I think, my method create is wrong in controller MALLA
I want to save the ids selected in the view malla from the controller
MALLA.

  def create
    params[:malla][:level][:subject_ids]

What is the above line of code for?

    @malla = Malla.new(params[:subject_ids][:level][:malla])
       if @malla.save
       redirect_to mallacurriculares_menu_principal_admin_path, :notice
=> 'MALLA CREATED'
     end
  end
******************************************************************
AND IN MY VIEW MALLA I HAVE:
<%=form_for @malla , :url => {:action=>"create"} do |f| %>
<% for c in @class %>
<%=f.radio_button :clase_id, c.id%> <%=c.tip_mall_descrip%>
<% end %>

<% for n in Level.find(:all) %>
<%=radio_button_tag :level, n.id%><%= n.level_number %>
<%end%>

<% for a in @subject%>
<%=check_box_tag
"malla[subject_ids][]",a.id,@malla.subject.include?(a)%>
<%= a.subject_name%>
<%end%>
<%=f.submit "SAVE"%>
<%end%>

My problem is, when I chose the options in my checkbox and radiobutton,
I can't get their "ids" in my table ASIGNATURAS_MALLAS_NIVELS, sometimes
I get this errors:

What error? I have asked before that you post the exact error and
tell us the line that the error occurs at. Before posting look
carefully at the error message and try and work out what it means.

How are you getting on with the Rails Guide on Debugging? What
techniques from there have you used to help debug your code

Please, someone help me, i'm doing my thesis.

We can't help unless you give us the data so we can work out what the
problem is.

Colin