I🍻
= form.file_field ...
= form.submit
def action
respond_to |format|
format.json
..
format.js
end
end
erb.js
alert....
Size: a a a
I🍻
I🍻
I🍻
LA
['Contact', 'ContactCommunicationItem', 'ContactCommunicationItemLabel']
'Contact', 'ContactCommunicationItemLabel', 'ContactCommunicationItem'
LA
NB
LA
where(
item_type: ['ContactCommunicationItemLabel', 'Contact', 'ContactCommunicationItem']
)LA
LA
NB
NB
LA
Contact
, потом ContactCommunicationItem
, и потом ContactCommunicationItemLabel
.Contact
- ContactCommunicationItemLabel
- ContactCommunicationItem
LA
NB
NB
NB
LA
LA
NB
query = <<~SQL
SELECT versions.* FROM versions WHERE item_type = 'Contact'
UNION SELECT versions.* FROM versions WHERE item_type = 'ContactCommunicationItemLabel'
UNION SELECT versions.* FROM versions WHERE item_type = 'ContactCommunicationItem'
SQL
Version.find_by_sql(query)
LA