Skip to content

Commit

Permalink
Merge pull request #11 from kitak/rails4-support
Browse files Browse the repository at this point in the history
Supports Rails4
  • Loading branch information
Mattias Svedhem committed Aug 31, 2013
2 parents ff06637 + ab2c82c commit 186ae69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ fancybox2-rails
[![Build Status](https://travis-ci.org/kyparn/fancybox2-rails.png)](https://travis-ci.org/kyparn/fancybox2-rails)


Use [fancybox](http://www.fancyapps.com/fancybox/) with rails 3.1 asset pipeline.
Use [fancybox](http://www.fancyapps.com/fancybox/) with rails 3.1/4 asset pipeline.

## Installation

This gem vendors jquery fancybox 2 for Rails 3.1 and greater. The files
This gem vendors jquery fancybox 2 for Rails 3.1/4 and greater. The files
will be added to the asset pipeline and available for you to use.

First add the following lines to your applications `Gemfile`:
Expand Down
6 changes: 3 additions & 3 deletions fancybox2-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Gem::Specification.new do |s|
s.email = ["[email protected]"]
s.homepage = "https://github.com/kyparn/fancybox2-rails"

s.summary = "Use FancyBox 2 with Rails 3.1"
s.description = "This gem provides jQuery FancyBox 2 for your Rails 3.1 application. This gem is based on the gem for Fancybox 1.x by Chris Mytton"
s.summary = "Use FancyBox 2 with Rails 3.1/4.0"
s.description = "This gem provides jQuery FancyBox 2 for your Rails 3.1/4.0 application. This gem is based on the gem for Fancybox 1.x by Chris Mytton"
s.files = Dir["{lib,vendor}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.md"]
s.version = Fancybox2::Rails::VERSION

s.add_dependency "railties", ">= 3.1.0"
s.add_development_dependency "rails", "~> 3.1"
s.add_development_dependency "rails", ">= 3.1"
s.add_development_dependency "jquery-rails"
s.add_development_dependency 'coffee-rails'
s.add_development_dependency "sqlite3"
Expand Down
2 changes: 1 addition & 1 deletion lib/fancybox2-rails.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if defined? Rails && Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 1
if defined? Rails && Rails.application.config.try(:assets).try(:compile)
require 'fancybox2/rails'
end

0 comments on commit 186ae69

Please sign in to comment.