sharp_admin 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sharp_admin/sharp_admin_generator.rb +1 -1
- data/lib/sharp_admin/templates/base_helper.rb +1 -1
- data/lib/sharp_admin/templates/controller.rb +1 -1
- data/lib/sharp_admin/templates/controller_spec.rb +1 -1
- data/lib/sharp_admin/templates/views/index.html.erb +2 -2
- data/lib/sharp_admin/templates/views/new.html.erb +1 -1
- data/lib/sharp_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8c1fe26660549a9135ed9c14f5b49cf510d58d4
|
4
|
+
data.tar.gz: 26da2eb5145abf05a03d717b02c1e49ebbb0472b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6350acd2e70401b9306e016a2ff5a365256066b20dc688e81cd67958744ad6d2aae9e957e7a6e9f97ed2d3be95f0e025c6cf9b6aa38a1bc9ee0d4b449713c5c
|
7
|
+
data.tar.gz: 68979197794bbc906b11766696593ce3e14e360bd045cc362228d44ed3a1d6234ece7397eeaf39fa29cde51dae08440292cb4bdc4162d55fc8f327063a56395e
|
@@ -50,7 +50,7 @@ class SharpAdminGenerator < Rails::Generators::NamedBase
|
|
50
50
|
|
51
51
|
def add_resource_route
|
52
52
|
return if not File.exists?("config/routes.rb")
|
53
|
-
route_config = "namespace #{options[:ns]
|
53
|
+
route_config = "namespace #{options[:ns].to_sym} do "
|
54
54
|
route_config << "resources :#{file_name.pluralize}"
|
55
55
|
route_config << " end"
|
56
56
|
route route_config
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class <%= options[:
|
1
|
+
class <%= options[:ns].classify %>::<%= controller_class_name %>Controller < <%= options[:ns].classify %>::BaseController
|
2
2
|
|
3
3
|
helper_method :sort_column, :sort_direction
|
4
4
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe <%= options[:
|
3
|
+
describe <%= options[:ns].classify %>::<%= controller_class_name %>Controller do
|
4
4
|
|
5
5
|
def mock_<%= singular_table_name %>(stubs={})
|
6
6
|
(@mock_<%= singular_table_name %> ||= mock_model(<%= class_name %>).as_null_object).tap do |<%= singular_table_name %>|
|
@@ -26,10 +26,10 @@
|
|
26
26
|
%th Delete
|
27
27
|
<% end -%>
|
28
28
|
%tbody
|
29
|
-
- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
|
29
|
+
- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
|
30
30
|
%tr.<%= singular_table_name %>
|
31
31
|
%td
|
32
|
-
= link_to(<%= singular_table_name %>.id, <%= options[:ns] %>_<%= singular_table_name %>_path(<%= singular_table_name %>))
|
32
|
+
= link_to(<%= singular_table_name %>.id, <%= options[:ns] %>_<%= singular_table_name %>_path(<%= singular_table_name %>))
|
33
33
|
<% @attributes.each do |attribute| -%>
|
34
34
|
<% next if attribute.name == "id" -%>
|
35
35
|
%td
|
@@ -2,5 +2,5 @@
|
|
2
2
|
%h3
|
3
3
|
Create new <%= human_name.downcase %>
|
4
4
|
|
5
|
-
= form_for [:
|
5
|
+
= form_for [<%= options[:ns] %>, @<%= singular_table_name %>], :html => { :class => "form-horizontal", :role => "form" } do |f|
|
6
6
|
= render "form", { :f => f }
|
data/lib/sharp_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharp_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sharp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|