New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

social_rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

social_rails

  • 3.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SocialRails

Ease the pain of integrating Facebook, Instagram and Twitter posts in a Rails app. Includes a configurable cache to keep your app from tipping over Facebook and Instagram api limits.

Installation

Gemfile

gem 'social_rails'

app/assets/javascripts/application.js

//= require social_rails/social-rails.js

config/routes.rb

mount SocialRails::Engine => '/social'

Configuration

Run rails g social_rails:config

Edit [Your project]/config/initializers/social_rails.rb

Each media options can be configured individually using SocialRails::[Media].configure method.

countdown #15.minutes by default
public: {
    post_count: # 1 by default
    max_characters: # 0 by default
    refresh: # false by default
    refresh_time: # 15.minutes.in_milliseconds by default
}

Utilisation

Pour utiliser la cache de Rails en developement:

  • cd to your project installation
  • run touch tmp/caching-dev.txt

Use the view helper:

<%= socialrails(:facebook [, options={}]) %>

Options must be an Hash of theses available options:

post_count # 1 by default
max_characters # 0 by default
refresh # false by default
refresh_time # 900000 (15 minutes) in milliseconds

Use the following generator command to override views.

rails g social_rails:views

FAQs

Package last updated on 16 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc