RailsCasts Pro episodes are now free!

Learn more or hide this

Đăng Khánh's Profile

GitHub User: khanhhd

Comments by Đăng Khánh

Avatar

I have a problem, I cannot start server when using gem
This errors:
ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:191:in normalize_conditions!': You should not use thematchmethod in your router without specifying an HTTP method. (RuntimeError)
If you want to expose your action to both GET and POST, add
via: [:get, :post]option.
If you want to expose your action to GET, use
get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"

Thank for help!

Avatar

usersdatatable.rb

def data
    users.map do |user|
      [
      link_to(user.name, user),
      h(user.email),
      link_to("delete", user, method: :delete, data: { confirm: 'Are you sure?' }),
      # check_box_tag('user[]', user.id)
      ]
    end
  end
  • it don't working When i add check_box_tag. Please help me!