Skip to content

Instantly share code, notes, and snippets.

Mitch Pronschinske mpron

Block or report user

Report or block mpron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _form.html.haml
= form_for @bottles do |f|
- if @bottles.errors.any?
#error_explanation
%h2= "#{pluralize(@bottles.errors.count, "error")} prohibited this wine from being saved:"
%ul
- @bottles.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :name, autofocus: true
View bottle.rb
#This is Rails 4.0.2 so the attr_accessible functionality is handled in the controller
class Bottle < ActiveRecord::Base
belongs_to :wine
belongs_to :user
belongs_to :location
end
You can’t perform that action at this time.