beautiful_scaffold 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rails"
5
+ gem "rails", "~> 3.1.0"
6
6
  # Pagination
7
7
  gem "will_paginate"
8
8
  # Search and filter
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "beautiful_scaffold"
6
- s.version = "0.0.6"
6
+ s.version = "0.0.7"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.summary = "Beautiful Scaffold generate fully customizable scaffold"
9
9
  s.email = "claudel.sylvain@gmail.com"
@@ -32,9 +32,12 @@ module BeautifulHelper
32
32
  end
33
33
 
34
34
  caption = t(attribute_name, :default => default_caption)
35
+ strpath = model_name.pluralize + "_url"
36
+ strpath = namespace + '_' + strpath if not namespace.blank?
37
+
35
38
  return link_to(
36
39
  "#{csort} #{caption}",
37
- eval(namespace + '_' + model_name.pluralize + "_url") + "?" +
40
+ eval(strpath) + "?" +
38
41
  CGI.unescape({:sorting => {:attribute => attribute_name.downcase,:sorting => opposite_sortstr}}.to_query)
39
42
  ).html_safe
40
43
  end
@@ -1,5 +1,5 @@
1
1
  <%-
2
- strformfor = singular_table_name
2
+ strformfor = "@#{singular_table_name}"
3
3
  if not namespace_alone.blank? then
4
4
  strformfor = "[:#{namespace_alone}, @#{singular_table_name} ]"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beautiful_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-06 00:00:00.000000000Z
12
+ date: 2012-03-10 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Beautiful Scaffold generate a complete scaffold (sort, export, paginate
15
15
  and filter data)