i have a custom validation method on user_calendar model:
class UserCalendar < ActiveRecord::Base
belongs_to :user
validate :should_match_company_calendars
...
private
def should_match_company_calendars
day_company_calendars = (..query..)
errors.add(:user, :company_calendar_match) if day_company_calendars.count < 1
end
And this is the message on en.yml:
company_calendar_match: "%{value.full_name} does not work in the selected time lapse"
Validation works fine but the message shows '%{value.full_name}' instead of the actual value for full_name. What am i missing?