ruby on rails - Why this remote request won't detect params? -


even if put checked , submit, transaction won't fired:(
why that?? body , else being submit fine.
doesn't detect , run transaction if check , submit... has idea?

controller

if params[:comment][:call]     transaction..... end 

view form (remote ajax)

<%=form_for(([@community, @comment]), :remote => true, :class => 'form' ) |f| %>     <%= f.check_box :call, :label => 'call' %> call         <div class="form-actions">             <div class="input-append">                 <%= f.text_field :body, :id => "input", :class => "box" %>               <button type="submit" class="btn">submit</button>         </div>     </div> <% end %> 

comment model

attr_accessible :icon, :call .... def call     @call ||= "0" end  def call=(value)     @call = value end 


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -