Skip to content

Instantly share code, notes, and snippets.

@rkellermeyer
Created August 16, 2012 15:55
Show Gist options
  • Save rkellermeyer/3371291 to your computer and use it in GitHub Desktop.
Save rkellermeyer/3371291 to your computer and use it in GitHub Desktop.
can't dump anonymous class #<Class:0x007fe4c7d29228>
= semantic_form_for [:admin, @sale], html: { :class => "filter_form" } do |f|
= select "sale_", "id", Sale.all.collect{ |s| [s.title + " " + s.start_date.to_s, s.id] }, {include_blank: true}, class: "sale_dropdown"
= f.inputs "Sale Information" do
= f.input :sales_merchandiser_id, :as => :hidden, :value => proc{current_user.id}
= f.input :category_id, as: :hidden
= f.input :title
= f.input :featured_image, as: :file, label: "Sale Image"
= content_tag :li, class: "field_toggle" do
%span.show_overwrite_fields Overwrite Versions
%span.hide_overwrite_fields Cancel Override
= f.input :individual_image, as: :file, label: "Medium"
= f.input :upcoming_image, as: :file, label: "Small"
= f.input :start_date, label: "Start Date", as: :string, input_html: { class: "datepicker" },wrapper_html: { class: "filter_form_field filter_date_range" }
= f.input :end_date, label: "End Date", as: :string, input_html: { class: "datepicker" }, wrapper_html: { class: "filter_form_field filter_date_range" }
= f.input :description, input_html: {class: :ckeditor}, cols: 10
= f.action(:submit)
= f.inputs "Product Assignment (Click to show/hide)", class: "inputs products" do
= content_tag :li, class: "current_products" do
%span.current_items_count This Sale - #{@sale.consignment_items.count} PRODUCTS
%span.current_showing_count Showing all products
= content_tag :div, class: "current_product_list" do
// Current Product List
= content_tag :ul do
- @sale.new_record? ? true : @sale.consignment_items.each do |ci|
= content_tag :li,
"data-designer" => ci.designer_id,
"data-size" => ci.consignment_item_size_id,
"data-color" => ci.consignment_item_color.all.map{ |ic| ic.name.titleize},
"data-type" => ci.item_type_id,
"data-title" => ci.title,
"data-description" => strip_tags(ci.description),
"data-warehouse" => "ci.warehouse",
"data-sku" => ci.id,
"data-consignor" => ci.consignor.id do
= content_tag :div, class: "meta" do
= content_tag :div, class: "meta_right" do
%span.odd <b>Type:</b> #{ItemType.find(ci.item_type_id).name}
%br
%span.even <b>Size:</b> #{ConsignmentItemSize.find(ci.consignment_item_size_id).name unless ci.consignment_item_size_id.nil?}
%br
%span.odd <b>Warehouse:</b>
%br
%span.odd <b>Description:</b> #{strip_tags(ci.item_description)}
= content_tag :div, class: "meta_left" do
%span.odd <b>SKU:</b> #141210
%br
%span.even <b>Price:</b> $#{ci.price}
%br
%span.odd <b>Title:</b> #{ci.title}
%br
%span.even <b>Designer:</b> #{Designer.find(ci.designer_id).name.humanize}
= check_box_tag "sale[consignment_item_ids][]", ci.id, ci.sales.include?(@sale)
= image_tag ci.primary_image.file.thumb
.clear
= content_tag :li, class: "swap_products" do
%span.leftArrow
%br
%span.rightArrow
= content_tag :li, class: "available_products" do
%span.available_items_count Inventory - #{ConsignmentItem.all.count} PRODUCTS
%span.available_showing_count Showing all products
= content_tag :div, class: "available_product_list" do
// Available Product List
= content_tag :ul do
- ConsignmentItem.all.each do |ci|
= content_tag :li,
"data-designer" => ci.designer_id,
"data-size" => ci.consignment_item_size_id,
"data-color" => ci.consignment_item_color.all.map{ |ic| ic.name.titleize},
"data-type" => ci.item_type_id,
"data-title" => ci.title,
"data-description" => strip_tags(ci.description),
"data-warehouse" => "ci.warehouse",
"data-sku" => ci.id,
"data-consignor" => ci.consignor.id do
= content_tag :div, class: "meta" do
= content_tag :div, class: "meta_right" do
%span.odd <b>Type:</b> #{ItemType.find(ci.item_type_id).name}
%br
%span.even <b>Size:</b> #{ConsignmentItemSize.find(ci.consignment_item_size_id).name unless ci.consignment_item_size_id.nil?}
%br
%span.odd <b>Warehouse:</b>
%br
%span.odd <b>Description:</b> #{strip_tags(ci.item_description)}
= content_tag :div, class: "meta_left" do
%span.odd <b>SKU:</b> #141210
%br
%span.even <b>Price:</b> $#{ci.price}
%br
%span.odd <b>Title:</b> #{ci.title}
%br
%span.even <b>Designer:</b> #{Designer.find(ci.designer_id).name.humanize}
= check_box_tag "sale[consignment_item_ids][]", ci.id, ci.sales.include?(@sale)
= image_tag ci.primary_image.file.thumb
.clear
= f.action :submit, label: "Update Products"
activerecord (3.2.5) lib/active_record/session_store.rb:54:in `dump'
activerecord (3.2.5) lib/active_record/session_store.rb:54:in `marshal'
activerecord (3.2.5) lib/active_record/session_store.rb:148:in `marshal_data!'
activesupport (3.2.5) lib/active_support/callbacks.rb:407:in `_run__3920145150091599796__save__2442430236767070326__callbacks'
activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.5) lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
activerecord (3.2.5) lib/active_record/callbacks.rb:264:in `create_or_update'
activerecord (3.2.5) lib/active_record/persistence.rb:84:in `save'
activerecord (3.2.5) lib/active_record/validations.rb:50:in `save'
activerecord (3.2.5) lib/active_record/attribute_methods/dirty.rb:22:in `save'
activerecord (3.2.5) lib/active_record/transactions.rb:241:in `block (2 levels) in save'
activerecord (3.2.5) lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
activerecord (3.2.5) lib/active_record/transactions.rb:208:in `transaction'
activerecord (3.2.5) lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
activerecord (3.2.5) lib/active_record/transactions.rb:241:in `block in save'
activerecord (3.2.5) lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
activerecord (3.2.5) lib/active_record/transactions.rb:240:in `save'
activerecord (3.2.5) lib/active_record/session_store.rb:321:in `block in set_session'
activesupport (3.2.5) lib/active_support/benchmarkable.rb:50:in `silence'
activerecord (3.2.5) lib/active_record/session_store.rb:318:in `set_session'
rack (1.4.1) lib/rack/session/abstract/id.rb:322:in `commit_session'
rack (1.4.1) lib/rack/session/abstract/id.rb:206:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.5) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `_run__3643054175722563255__call__2442430236767070326__callbacks'
activesupport (3.2.5) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.5) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.5) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.5) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.5) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.5) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.5) lib/rails/engine.rb:479:in `call'
railties (3.2.5) lib/rails/application.rb:220:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.5) lib/rails/rack/log_tailer.rb:17:in `call'
thin (1.4.1) lib/thin/connection.rb:80:in `block in pre_process'
thin (1.4.1) lib/thin/connection.rb:78:in `catch'
thin (1.4.1) lib/thin/connection.rb:78:in `pre_process'
thin (1.4.1) lib/thin/connection.rb:53:in `process'
thin (1.4.1) lib/thin/connection.rb:38:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.4.1) lib/thin/backends/base.rb:63:in `start'
thin (1.4.1) lib/thin/server.rb:159:in `start'
rack (1.4.1) lib/rack/handler/thin.rb:13:in `run'
rack (1.4.1) lib/rack/server.rb:265:in `start'
railties (3.2.5) lib/rails/commands/server.rb:70:in `start'
railties (3.2.5) lib/rails/commands.rb:55:in `block in <top (required)>'
railties (3.2.5) lib/rails/commands.rb:50:in `tap'
railties (3.2.5) lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment