diff --git a/.gitignore b/.gitignore index c74c95e..7280ca4 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ *.swp .env +.idea/* diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index aa69dc7..4f0f745 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -11,6 +11,10 @@ def display_date(date) date.to_formatted_s(:long_ordinal) end + def wishlist_url(wishlist) + request.base_url+"/wishlists/#{wishlist.id}" + end + private def current_user_pronouns(user, perspectives, capitalize: true) diff --git a/app/views/wishlists/new.html.erb b/app/views/wishlists/new.html.erb index 5475c3a..70f3822 100644 --- a/app/views/wishlists/new.html.erb +++ b/app/views/wishlists/new.html.erb @@ -1,6 +1,6 @@
-

Create a New Wishlist

+

Create a New Wishlist

<%= render 'form', wishlist: @wishlist %> diff --git a/app/views/wishlists/show.html.erb b/app/views/wishlists/show.html.erb index f9dc7fc..11916ce 100644 --- a/app/views/wishlists/show.html.erb +++ b/app/views/wishlists/show.html.erb @@ -1,7 +1,9 @@

<%= @wishlist.name %> - <%= social_share_button_tag("Are you a hero of play? #{@wishlist.name} needs your help!") %> + <%= social_share_button_tag("Are you a hero of play? #{@wishlist.name} needs your help!", + url: wishlist_url(@wishlist), + desc: "Are you a hero of play? #{@wishlist.name} needs your help!") %>

<% if current_user.can_manage?(@wishlist) %> diff --git a/config/initializers/social_share_button.rb b/config/initializers/social_share_button.rb index 79978d2..c2ffa7c 100644 --- a/config/initializers/social_share_button.rb +++ b/config/initializers/social_share_button.rb @@ -1,3 +1,3 @@ SocialShareButton.configure do |config| - config.allow_sites = %w(twitter email) + config.allow_sites = %w(facebook twitter email) end