Sha256: f2ea3b4b76b4935f4ecc6fa3c28fd123b22e0236c87012bc2c5dba0f56a7bc3a
Contents?: true
Size: 496 Bytes
Versions: 8
Compression:
Stored size: 496 Bytes
Contents
class VcardsController < ApplicationController # User 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, value| ['family_name', 'given_name', 'street_address', 'postal_code', 'locality'].include?(key)} @vcard.update_attributes(new_params) @vcard.save redirect_to @vcard.object end end
Version data entries
8 entries across 8 versions & 1 rubygems