Sha256: bc8cab90bcbec78f6f2c9808c4ff9e58247f7ff58395e6190b41b0dcba6e4f24
Contents?: true
Size: 548 Bytes
Versions: 5
Compression:
Stored size: 548 Bytes
Contents
module HasVcards class VcardsController < ApplicationController # Use inherited resources logic inherit_resources respond_to :html, :js def directory_lookup @vcard = Vcard.find(params[:id]) end def directory_update @vcard = Vcard.find(params[:id]) new_params = params[:vcard].select { |key, _| ['family_name', 'given_name', 'street_address', 'postal_code', 'locality'].include?(key) } @vcard.update_attributes(new_params) @vcard.save redirect_to @vcard.reference end end end
Version data entries
5 entries across 5 versions & 1 rubygems