Skip to content

Instantly share code, notes, and snippets.

@pftg
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save pftg/11285346 to your computer and use it in GitHub Desktop.

Select an option

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

miry commented Apr 25, 2014

Copy link
Copy Markdown
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

pftg commented Apr 25, 2014

Copy link
Copy Markdown
Author

ну молодца!

@tmwh

tmwh commented Apr 25, 2014

Copy link
Copy Markdown

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

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