Add full name methods on a model
class User < ActiveRecord::Base
act_as_nameable
with: [:first_name, :surname, :middle_name, :second_surname],
required: [:first_name, :surname]
end
Add gem 'act_as_nameable'
to Gemfile, then:
bundle install
Or install it yourself as:
gem install act_as_nameable
rake
- Fork repository
- Create a branch following a successfull branching model
- Write your feature/fix
- Pull request
Released under the MIT License. See the LICENSE file for further details.