0

チェックして送信しても、トランザクションは起動されません:(
なぜですか??bodyそして、他のすべては正常に送信されています。
チェックして送信しても、トランザクションを検出して実行しません...誰でも何か考えはありますか?

コントローラ

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

ビューフォーム(ajaxを使用したリモート)

<%=form_for(([@community, @comment]), :remote => true, :class => 'form' ) do |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 %>

コメントモデル

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

def call=(value)
    @call = value
end
4

0 に答える 0