-
Notifications
You must be signed in to change notification settings - Fork 49
Facebook share button working #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -305,7 +305,7 @@ DEPENDENCIES | |
| webmock (~> 3.0) | ||
|
|
||
| RUBY VERSION | ||
| ruby 2.3.3p222 | ||
| ruby 2.4.1p111 | ||
|
|
||
| BUNDLED WITH | ||
| 1.15.4 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually built into Rails, so you can remove this method. As an added bonus, the pre-included method will match your app configuration without extra work (ex. with subdomains, ports, friendly urls/slugs, etc.) Here's a section of the official Rails Guides talking about |
||
|
|
||
| private | ||
|
|
||
| def current_user_pronouns(user, perspectives, capitalize: true) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,9 @@ | ||
| <div class="container"> | ||
| <h2> | ||
| <%= @wishlist.name %> | ||
|
|
||
| <% if Rails.env.production? %> | ||
| <% url_share = "https://project-playtime-staging.herokuapp.com/wishlists/#{@wishlist.id}" %> | ||
| <% else %> | ||
| <% url_share = "https://project-playtime-staging.herokuapp.com/wishlists/#{@wishlist.id}" %> | ||
| <% end %> | ||
|
|
||
| <%= social_share_button_tag("Are you a hero of play? #{@wishlist.name} needs your help!",:url => url_share,desc: "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!") %> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good! 👍 I like how you broke this up into multiple lines. Much easier to read! |
||
| </h2> | ||
|
|
||
| <% if current_user.can_manage?(@wishlist) %> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍