Internal Listings: Fill Tweet Text (#3992)
* fill tweet with info even if user doesn't have twitter * shorten twitter username check access user from listing instead of finding user via id
This commit is contained in:
parent
590149fd48
commit
6be90c9ad4
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@
|
|||
<%= form_tag "/internal/buffer_updates" do %>
|
||||
<input type="hidden" name="social_channel" value="listings_twitter" />
|
||||
<input type="hidden" name="listing_id" value="<%= listing.id %>" />
|
||||
<textarea cols="37" rows="8" wrap="hard" name="tweet" maxlength="255"><% if User.find(listing.user_id).twitter_username.present? %>📋 New DEV Listing!

Category: <%= listing.category %>

<%= listing.title %>

Posted by @<%= User.find(listing.user_id).twitter_username %><% end %></textarea>
|
||||
<textarea cols="37" rows="8" wrap="hard" name="tweet" maxlength="255">📋 New DEV Listing!

Category: <%= listing.category %>

<%= listing.title %>

<% if listing.user.twitter_username? %>Posted by @<%= listing.user.twitter_username %><% end %></textarea>
|
||||
<br>
|
||||
<button class="btn-info tweet-listing">🐦 Tweet 🐦</button>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue