This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!
I just published from a draft here: https://publiclab.org/notes/warren/03-19-2019/assembling-the-simple-air-sensor and it correctly updated the timestamp to "now" when i published, as you can see in the URL.
But on the dashboard it shows up as "4 days ago" so I think we are not updating the revision timestamp as well...
Here's the code:
I think we need to add a line to update the @node.latest (i.e. the most recent revision) timestamp to Time.now like:
revision = @node.latest
revision.timestamp = Time.now.to_i
revision.save
Thank you!!!
@jywarren I want to work on this.
Go ahead @jainaman224!
@jywarren
Url is updated due to https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L140 use of Time.now but we are using node.created_at as publish time. Which can't be changed.
In Node model there is no publish time. So, how should I approach it?
Addressing this in #6913!
Most helpful comment
@jywarren I want to work on this.