include_behaviors 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{include_behaviors}
3
- s.version = "0.0.4"
3
+ s.version = "0.0.5"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Nathan Verni"]
@@ -2,7 +2,10 @@ module Focastle
2
2
  module IncludeBehaviors
3
3
  module InstanceMethods
4
4
  def include_behaviors
5
- javascript_include_tag "behaviors/#{params[:controller]}/#{@js_behavior.to_s || params[:action]}.js" unless @skip_js
5
+ unless @skip_js
6
+ action = @js_action.blank? ? params[:action] : @js_action.to_s
7
+ javascript_include_tag "behaviors/#{params[:controller]}/#{action}.js"
8
+ end
6
9
  end
7
10
  end
8
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: include_behaviors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Verni