Added method to model for field concatenation for drop-down

Recent change to drop-down didn't show sub-version number. To add it to option_groups_from_collection_for_select needed new 'field' (method to concat field) in model, so added that. Then able to use this artifical field in building appropriate drop-downs. Then added check for blank:

  def version_and_subversion
    if sub_version_name.blank? 
      version_name 
    else
      version_name + '.' + sub_version_name
    end
  end 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s