cruj_cruj_cruj 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8b955cb852816c5677335be696e5ec1820b0c0d
4
- data.tar.gz: 2e55d0a851cc8d10ee5c190c8eab4c518cea1d7e
3
+ metadata.gz: 157439fca94221292578ebf7c8eca1a229bfc0c4
4
+ data.tar.gz: a585e5167a67729441ca5fae4456f0d31ee6d44b
5
5
  SHA512:
6
- metadata.gz: 0917249ef28b435372e4d65489d7dea965c9d91ebfdd82cd097ed38f07278943c255e2b794d50e8d93a71b464d86cd64d91ef045e8d00513c5b6a4170656fb8f
7
- data.tar.gz: beca3b7dcee9ee00a77589fdb996f6cd7bae6091f017abf7a794c21de7501af456bbb4f1f472c23364fe5ad02a9c07ad50632117568bd08e0238f6caab42878a
6
+ metadata.gz: ecce3e7334340a84428590bd904cf3dae4d837fe0d9846ac54612f4fcee5c7ceca601b0b94100f8f6f6cf7e775378a07529105d7949920ec252dc70ebc30a462
7
+ data.tar.gz: f7278c115afabad714c80ad6fbb9131d45ea500b66912db34c13a4af04a60aab2f24688e7612f8246affdffc73849a2a047860c4c499d88dfa35a180a2bcb6f5
@@ -1,16 +1,16 @@
1
1
  class CrujCrujCrujController < ApplicationController
2
2
  include ActionView::Helpers::NumberHelper
3
3
 
4
- before_action :before_index , only: [:index]
5
- before_action :before_new , only: [:new]
6
- before_action :before_create, only: [:create]
7
- before_action :before_edit , only: [:edit]
8
- before_action :before_update, only: [:update]
9
- before_action :before_destroy, only: [:destroy]
4
+ before_filter :before_index , only: [:index]
5
+ before_filter :before_new , only: [:new]
6
+ before_filter :before_create, only: [:create]
7
+ before_filter :before_edit , only: [:edit]
8
+ before_filter :before_update, only: [:update]
9
+ before_filter :before_destroy, only: [:destroy]
10
10
 
11
- before_action :find_all_resources, only: [:index]
12
- before_action :build_resource , only: [:new, :create]
13
- before_action :find_resource , only: [:edit, :update, :destroy]
11
+ before_filter :find_all_resources, only: [:index]
12
+ before_filter :build_resource , only: [:new, :create]
13
+ before_filter :find_resource , only: [:edit, :update, :destroy]
14
14
 
15
15
  helper_method :namespace_url, :namespaces, :model_class, :snake_case_model_name,
16
16
  :resource_url,
@@ -120,7 +120,11 @@ class CrujCrujCrujController < ApplicationController
120
120
  end
121
121
 
122
122
  def resource_url(resource)
123
- namespace_url + [resource] + [ resource.respond_to?(:type) ? {"type" => resource.type} : {} ]
123
+ if Rails::VERSION::MAJOR >= 4
124
+ namespace_url + [resource] + [ resource.respond_to?(:type) ? {"type" => resource.type} : {} ]
125
+ else
126
+ namespace_url + [resource]
127
+ end
124
128
  end
125
129
 
126
130
  def index_attributes
@@ -1,3 +1,3 @@
1
- <h2><%= t('edit_#{snake_case_model_name}_title') %></h2>
1
+ <h2><%= t("edit_#{snake_case_model_name}_title") %></h2>
2
2
 
3
3
  <%= render partial: "form" %>
@@ -1,3 +1,3 @@
1
- <h2><%= t("edit_#{snake_case_model_name}_title") %></h2>
1
+ <h2><%= t("new_#{snake_case_model_name}_title") %></h2>
2
2
 
3
3
  <%= render partial: "form" %>
@@ -1,3 +1,3 @@
1
1
  module CrujCrujCruj
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cruj_cruj_cruj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Campos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -183,40 +183,41 @@ signing_key:
183
183
  specification_version: 4
184
184
  summary: Crud Generator for Redmine
185
185
  test_files:
186
- - test/integration/navigation_test.rb
187
- - test/cruj_cruj_cruj_test.rb
188
- - test/dummy/config.ru
189
- - test/dummy/config/boot.rb
190
- - test/dummy/config/database.yml
191
- - test/dummy/config/secrets.yml
192
- - test/dummy/config/routes.rb
193
- - test/dummy/config/locales/en.yml
194
- - test/dummy/config/application.rb
195
- - test/dummy/config/initializers/mime_types.rb
196
- - test/dummy/config/initializers/filter_parameter_logging.rb
197
- - test/dummy/config/initializers/wrap_parameters.rb
186
+ - test/dummy/app/assets/javascripts/application.js
187
+ - test/dummy/app/assets/stylesheets/application.css
188
+ - test/dummy/app/controllers/application_controller.rb
189
+ - test/dummy/app/helpers/application_helper.rb
190
+ - test/dummy/app/views/layouts/application.html.erb
191
+ - test/dummy/bin/bundle
192
+ - test/dummy/bin/rails
193
+ - test/dummy/bin/rake
194
+ - test/dummy/bin/setup
195
+ - test/dummy/config/environments/development.rb
196
+ - test/dummy/config/environments/production.rb
197
+ - test/dummy/config/environments/test.rb
198
+ - test/dummy/config/initializers/assets.rb
198
199
  - test/dummy/config/initializers/backtrace_silencers.rb
199
200
  - test/dummy/config/initializers/cookies_serializer.rb
201
+ - test/dummy/config/initializers/filter_parameter_logging.rb
200
202
  - test/dummy/config/initializers/inflections.rb
203
+ - test/dummy/config/initializers/mime_types.rb
201
204
  - test/dummy/config/initializers/session_store.rb
202
- - test/dummy/config/initializers/assets.rb
205
+ - test/dummy/config/initializers/wrap_parameters.rb
206
+ - test/dummy/config/locales/en.yml
207
+ - test/dummy/config/application.rb
208
+ - test/dummy/config/boot.rb
209
+ - test/dummy/config/database.yml
203
210
  - test/dummy/config/environment.rb
204
- - test/dummy/config/environments/test.rb
205
- - test/dummy/config/environments/production.rb
206
- - test/dummy/config/environments/development.rb
207
- - test/dummy/public/500.html
208
- - test/dummy/public/favicon.ico
211
+ - test/dummy/config/routes.rb
212
+ - test/dummy/config/secrets.yml
209
213
  - test/dummy/public/404.html
210
214
  - test/dummy/public/422.html
215
+ - test/dummy/public/500.html
216
+ - test/dummy/public/favicon.ico
211
217
  - test/dummy/README.rdoc
212
- - test/dummy/bin/rake
213
- - test/dummy/bin/rails
214
- - test/dummy/bin/setup
215
- - test/dummy/bin/bundle
216
- - test/dummy/app/views/layouts/application.html.erb
217
- - test/dummy/app/helpers/application_helper.rb
218
- - test/dummy/app/assets/stylesheets/application.css
219
- - test/dummy/app/assets/javascripts/application.js
220
- - test/dummy/app/controllers/application_controller.rb
221
218
  - test/dummy/Rakefile
219
+ - test/dummy/config.ru
220
+ - test/integration/navigation_test.rb
221
+ - test/cruj_cruj_cruj_test.rb
222
222
  - test/test_helper.rb
223
+ has_rdoc: