mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
truncate content
This commit is contained in:
parent
9e7e38b525
commit
b733dedfab
1 changed files with 2 additions and 1 deletions
|
@ -79,10 +79,11 @@ class Paper < ActiveRecord::Base
|
||||||
class << self
|
class << self
|
||||||
def import_from_json(json_string)
|
def import_from_json(json_string)
|
||||||
old_count = count
|
old_count = count
|
||||||
|
content = truncate(record['content'], 99998)
|
||||||
JSON.parse(json_string).each do |record|
|
JSON.parse(json_string).each do |record|
|
||||||
attributes = {
|
attributes = {
|
||||||
body: record['body'],
|
body: record['body'],
|
||||||
content: record['content'],
|
content: content,
|
||||||
name: record['name'],
|
name: record['name'],
|
||||||
resolution: record['resolution'],
|
resolution: record['resolution'],
|
||||||
originator: record['originator'],
|
originator: record['originator'],
|
||||||
|
|
Loading…
Reference in a new issue