Skip to content

Instantly share code, notes, and snippets.

@pftg
Last active August 29, 2015 14:00
Show Gist options
  • Save pftg/11285346 to your computer and use it in GitHub Desktop.
Save pftg/11285346 to your computer and use it in GitHub Desktop.
showing_request.showing_request_notifications.
create!({
recipient: 'listing_agent',
notification_type: 'email',
contact_name: 'John Smith',
contact: 'john@example.com',
token: 'token'
},
without_protection: true)
showing_request.showing_request_notifications.create!({
recipient: 'listing_agent',
notification_type: 'email',
contact_name: 'John Smith',
contact: 'john@example.com',
token: 'token'
},
without_protection: true)
showing_request.showing_request_notifications.create!({ recipient: 'listing_agent',
notification_type: 'email',
contact_name: 'John Smith',
contact: 'john@example.com',
token: 'token' },
without_protection: true)
showing_request.showing_request_notifications.
create!({ recipient: 'listing_agent',
notification_type: 'email',
contact_name: 'John Smith',
contact: 'john@example.com',
token: 'token' },
without_protection: true)
@miry
Copy link

miry commented Apr 25, 2014

notification_attributes = { recipient: 'listing_agent',
                            notification_type: 'email',
                            contact_name: 'John Smith',
                            contact: 'john@example.com',
                            token: 'token' }

showing_request.showing_request_notifications.create! notification_attributes,
                                                      without_protection: true

@pftg
Copy link
Author

pftg commented Apr 25, 2014

ну молодца!

@tmwh
Copy link

tmwh commented Apr 25, 2014

Нельзя быстро добавить элемент ни в начало, ни в конец хеша

notification_attributes = { 
                            recipient: 'listing_agent',
                            notification_type: 'email',
                            contact_name: 'John Smith',
                            contact: 'john@example.com',
                            token: 'token' 
                          }

showing_request.showing_request_notifications.create! notification_attributes,
                                                      without_protection: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment