Skip to content
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

Fix for instagram links #2849

Merged
merged 12 commits into from
Dec 21, 2018
6 changes: 3 additions & 3 deletions app/views/admin/enterprises/form/_social.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
.alpha.three.columns
= f.label :facebook, 'Facebook'
.omega.eight.columns
= f.text_field :facebook
= f.text_field :facebook, { placeholder: t('.facebook_placeholder') }
.row
.alpha.three.columns
= f.label :instagram, 'Instagram'
.omega.eight.columns
= f.text_field :instagram
= f.text_field :instagram, { placeholder: t('.instagram_placeholder') }
.row
.alpha.three.columns
= f.label :linkedin, 'LinkedIn'
.omega.eight.columns
= f.text_field :linkedin
= f.text_field :linkedin, { placeholder: t('.linkedin_placeholder') }
.row
.alpha.three.columns
= f.label :twitter
Expand Down
3 changes: 3 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,9 @@ en:
close_date: Close Date
social:
twitter_placeholder: eg. @the_prof
instagram_placeholder: eg. the_prof
facebook_placeholder: eg. www.facebook.com/PageNameHere
linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere
stripe_connect:
connect_with_stripe: "Connect with Stripe"
stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started."
Expand Down
8 changes: 8 additions & 0 deletions db/migrate/20181008201815_update_instagram_data.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class UpdateInstagramData < ActiveRecord::Migration
def change
Enterprise.where("instagram like ?", "%instagram.com%").find_each do |e|
e.instagram = e.instagram.split('/').last
e.save
end
end
end