Thursday, 28 June 2018

Fix hp wifi problem

1. First:

sudo modprobe -rv rtl8723be

sudo modprobe -v rtl8723be ant_sel=2
2. Second:
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=1

Wednesday, 6 June 2018

Devise form anywhere rails

Application controller:-

helper_method :resource_name, :resource, :devise_mapping, :resource_class

  def resource_name
    :user
  end

  def resource
    @resource ||= User.new
  end

  def resource_class
    User
  end

  def devise_mapping
    @devise_mapping ||= Devise.mappings[:user]
  end