Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
File not assigned
attr_accessible :name, :first_name, :last_name, :email, :password, :password_confirmation, :remember_me,
:provider, :uid, :photos_attributes
has_many :photos
accepts_nested_attributes_for :photos
class Photo < ActiveRecord::Base
attr_accessible :id, :photo, :user_id
belongs_to :user
mount_uploader :photo, PhotoUploader
def show
@photos =
def update
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-vertical', :multipart => true }) do |f| %>
<%= f.error_notification %>
<%= f.fields_for :photos do |p| %>
<%= p.file_field :photo %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment