Skip to content

Instantly share code, notes, and snippets.

@jperrine
Created March 22, 2012 15:02
Show Gist options
  • Save jperrine/2158854 to your computer and use it in GitHub Desktop.
Save jperrine/2158854 to your computer and use it in GitHub Desktop.
irb(main):007:0> RestaurantModel.create name: 'Foo Bar'
=> #<Restaurant @values={:id=>7, :merchant_id=>nil, :name=>"Foo Bar", :created_at=>2012-03-22 10:57:53 -0400, :updated_at=>2012-03-22 10:57:53 -0400, :neighborhood_id=>nil, :metro_id=>nil, :price_rating=>nil, :reservation_max_party_size=>8, :reservation_days_in_advance=>nil, :time_zone=>nil, :accepts_reservations=>true, :uses_table_management=>nil, :reservation_no_show_after_minutes=>15, :server_balance_mode=>2, :server_balance_importance=>5, :customer_vip_after_visits=>5, :sms_default_pager_message=>nil, :email_from_address=>nil, :email_from_name=>nil, :phone_number=>nil, :reservation_pre_close_minutes=>60, :agreed_to_mail=>nil, :restaurant_guid=>nil, :non_customized_trial=>nil, :useful_notes_rtf=>nil, :subdomain=>nil, :uses_manual_slotting=>true, :replyto_email=>nil, :replyto_sender_name=>nil, :activation_date=>nil, :table_manager=>nil, :monthly_fee=>nil, :transaction_fee=>nil, :monthly_fee_cap=>nil, :reservation_email_template=>nil, :reservation_from_email_address=>nil, :reservation_from_name=>nil, :facebook_id=>nil, :publicly_viewable_rating=>nil, :auto_payment_enabled=>nil, :auto_payment_token=>nil, :auto_payment_account_number=>nil, :auto_payment_account_type=>nil, :priority=>nil, :mailchimp_list_id=>nil, :dresscode=>nil, :cashonly=>nil, :cached_slug=>nil, :open_for=>nil, :automated_registration_phone_number=>nil, :availability_affected=>false, :rate_limit_enabled=>nil, :rate_limit_amount=>nil, :rate_limit_minutes=>nil, :deleted_at=>nil, :popularity=>0, :deactivation_date=>nil, :reservation_message=>nil, :wait_list_sms_phone_number=>nil, :uses_manual_wait_times=>false, :wait_times_set_for_entire_restaurant=>false, :copy_reservation_email_address=>nil, :reservation_pre_meal_minutes=>nil, :pre_reservation_message=>nil, :auto_server_areas_invalidated=>nil, :custom_no_show_fee_terms=>nil, :mediastorm_code=>nil, :auto_server_areas_updated_at=>1980-01-01 00:00:00 -0500, :search_terms=>nil, :rhv_state_invalidated_at=>1980-01-01 00:00:00 -0500, :remote_availability_widget_start_time=>nil}>
irb(main):008:0> RestaurantModel.create name: 'Foo Bar'
ArgumentError: wrong number of arguments (1 for 0)
from /Users/jperrine/Dropbox/Work/elc/table-saver/lib/model_object.rb:121:in `block in define_wrapped_singleton_method'
from (irb):8
from /Users/jperrine/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment