shoestrap 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  #Changelog
2
2
 
3
+ ## 0.0.4
4
+
5
+ * fix update/create actions in generated controller
6
+
3
7
  ## 0.0.3
4
8
 
5
9
  * add simple_form locale (only :de)
data/shoestrap.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "shoestrap"
6
- s.version = '0.0.3'
6
+ s.version = '0.0.4'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Immanuel Häussermann", "Felipe Kaufmann", "Phil Schilter", "Noëlle Rosenberg"]
9
9
  s.email = "info@screenconcept.ch"
@@ -45,7 +45,7 @@ class <%= controller_class_name %>Controller < Kuhsaft::Cms::AdminController
45
45
  # POST <%= route_url %>
46
46
  # POST <%= route_url %>.json
47
47
  def create
48
- @<%= singular_table_name %> = <%= orm_class.build(class_name.gsub('Cms::',''), "params[:#{singular_table_name.gsub('_cms','')}]") %>
48
+ @<%= singular_table_name %> = <%= orm_class.build(class_name.gsub('Cms::',''), "params[:#{singular_table_name.gsub('cms_','')}]") %>
49
49
 
50
50
  respond_to do |format|
51
51
  if @<%= orm_instance.save %>
@@ -64,7 +64,7 @@ class <%= controller_class_name %>Controller < Kuhsaft::Cms::AdminController
64
64
  @<%= singular_table_name %> = <%= orm_class.find(class_name.gsub('Cms::',''), "params[:id]") %>
65
65
 
66
66
  respond_to do |format|
67
- if @<%= orm_instance.update_attributes("params[:#{singular_table_name.gsub('_cms','')}]") %>
67
+ if @<%= orm_instance.update_attributes("params[:#{singular_table_name.gsub('cms_','')}]") %>
68
68
  format.html { redirect_to <%= singular_table_name %>_path(@<%= singular_table_name %>), <%= key_value :notice, "'#{human_name} was successfully updated.'" %> }
69
69
  format.json { head :no_content }
70
70
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoestrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: