funky_tabs 0.1.6 → 0.1.51

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('funky_tabs', '0.1.6') do |p|
5
+ Echoe.new('funky_tabs', '0.1.51') do |p|
6
6
  p.description = "Create Ajaxified tabs with simple history through window location hashes for Rails."
7
7
  p.url = "http://github.com/thomaspouncy/funky_tabs"
8
8
  p.author = "Thomas Pouncy"
data/funky_tabs.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{funky_tabs}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.51"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Thomas Pouncy"]
9
- s.date = %q{2011-07-13}
9
+ s.date = %q{2011-06-01}
10
10
  s.description = %q{Create Ajaxified tabs with simple history through window location hashes for Rails.}
11
11
  s.email = %q{thomas.pouncy@gmail.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "README.rdoc", "lib/funky_tabs.rb", "lib/funky_tabs/helpers.rb", "lib/funky_tabs/rails.rb", "lib/funky_tabs/renderers.rb", "lib/funky_tabs/tab.rb", "lib/funky_tabs/tab_action.rb"]
data/lib/funky_tabs.rb CHANGED
@@ -123,17 +123,6 @@ module FunkyTabs
123
123
  return location_hash_for_tab_action(tab,tab_action)
124
124
  end
125
125
 
126
- def self.controller_for_tab(tab)
127
- return default_tabs_controller if tab.nil?
128
- unless tab.is_a?(FunkyTabs::Tab)
129
- tab_index = find_tab(tab)
130
- return default_tabs_controller if tab_index.nil?
131
- tab = tabs[tab_index]
132
- end
133
- return tab.controller_name unless tab.controller_name.blank?
134
- return default_tabs_controller
135
- end
136
-
137
126
  def self.content_path_for_tab_and_tab_action(tab,tab_action=nil,tab_action_id=nil)
138
127
  unless tab.is_a?(FunkyTabs::Tab)
139
128
  tab_index = find_tab(tab)
@@ -151,9 +140,9 @@ module FunkyTabs
151
140
  return tab_action.content_path+"?id=#{tab_action_id}"
152
141
  end
153
142
  if tab_action.name.downcase == "index"
154
- content_path = "/#{controller_for_tab(tab)}/#{tab.name.gsub(/\s/,"_").downcase}_index"
143
+ content_path = "/#{default_tabs_controller}/#{tab.name.gsub(/\s/,"_").downcase}_index"
155
144
  else
156
- content_path = "/#{controller_for_tab(tab)}/#{tab_action.name.gsub(/\s/,"_").downcase}_#{tab.name.gsub(/\s/,"_").downcase}"
145
+ content_path = "/#{default_tabs_controller}/#{tab_action.name.gsub(/\s/,"_").downcase}_#{tab.name.gsub(/\s/,"_").downcase}"
157
146
  end
158
147
  return content_path if tab_action_id.nil?
159
148
  return "#{content_path}/#{tab_action_id}"
@@ -7,7 +7,6 @@ module FunkyTabs
7
7
  attr_accessor :title
8
8
  attr_accessor :default_tab_action
9
9
  attr_accessor :tab_actions
10
- attr_accessor :controller_name
11
10
 
12
11
  #default values for attrs
13
12
  def title
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: funky_tabs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.6
5
+ version: 0.1.51
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thomas Pouncy
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-13 00:00:00 -07:00
13
+ date: 2011-06-01 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16