ish_manager 0.1.8.23 → 0.1.8.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7321ef6d866b6c6ef55008414a64bd2838c57aa
4
- data.tar.gz: e01b404689d320b94b2dc60d032923b8e96be936
3
+ metadata.gz: a38a20e38b5e29c8e5f4258bd58942a922a0b369
4
+ data.tar.gz: bab59f30485aee9d86b95ef9c02627e1be30f985
5
5
  SHA512:
6
- metadata.gz: b5cf4cb139bc4bd91696ca450ace3ce18dece7262477628227e8d64a954abcef65c874e18fe5afc937306a9a69a97a2b80ef46a1018ee26b047e4a781250e9dd
7
- data.tar.gz: c37b1b4e10aa55eb68feec642265c481b6f92709d332514fc46e0ba0e591c7f8bcbe16356c93658dac69a7ded0b5634ed379a6b8bd12dfed5ca05b29718501d4
6
+ metadata.gz: 008e4acf1a5b152bf3c947f08877224205ece3b4c356ddda3763094ce6ecb6fcb7480345e045f2dda5dc582d54a9e7d5c22814c574530d78636f527cf5f42264
7
+ data.tar.gz: 604ca5f41e82ef3327774aa48aeaa613cbf279c7377b2f618d66ada64bdf544cf25ced91ae815b67c328f62af91b9df9051e48f8a0b6d2341fb19e8a786502ae
@@ -14,17 +14,19 @@ class IshManager::CitiesController < IshManager::ApplicationController
14
14
  end
15
15
 
16
16
  def new
17
- authorize! :new, ManagerCity.new
18
17
  @city = City.new
18
+ authorize! :new, City
19
+
19
20
  @photo = Photo.new
20
21
  end
21
22
 
22
23
  def create
23
- authorize! :create, ManagerCity.new
24
24
  @city = City.new params[:city].permit!
25
+ authorize! :create, @city
26
+
25
27
  if @city.save
26
28
  flash[:notice] = 'Success'
27
- redirect_to manager_cities_path
29
+ redirect_to cities_path
28
30
  else
29
31
  flash[:error] = 'No Luck'
30
32
  render :action => :new
@@ -36,12 +38,12 @@ class IshManager::CitiesController < IshManager::ApplicationController
36
38
  end
37
39
 
38
40
  def update
39
- authorize! :update, ManagerCity.new
40
41
  @city = City.find( params[:id] )
42
+ authorize! :update, @city
41
43
  @city.update_attributes params[:city].permit!
42
44
  if @city.save
43
45
  flash[:notice] = 'Success'
44
- redirect_to edit_manager_city_path @city.id
46
+ redirect_to edit_city_path @city.id
45
47
  else
46
48
  flash[:error] = 'No Luck. ' + @city.errors.inspect
47
49
  @newsitems = @city.newsitems.all.page( params[:newsitems_page] )
@@ -52,7 +54,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
52
54
  end
53
55
 
54
56
  def change_profile_pic
55
- authorize! :change_profile_pic, ManagerCity.new
57
+ authorize! :change_profile_pic, City
56
58
  @city = City.find params[:id]
57
59
  @photo = Photo.new params[:photo]
58
60
  @photo.user = @current_user
@@ -64,7 +66,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
64
66
  else
65
67
  flash[:error] = "No Luck. #{@photo.errors.inspect} #{@city.errors.inspect}"
66
68
  end
67
- redirect_to manager_cities_path
69
+ redirect_to cities_path
68
70
  end
69
71
 
70
72
  private
@@ -30,6 +30,10 @@
30
30
  .field
31
31
  = f.label :n_features
32
32
  = f.number_field :n_features
33
+
34
+ .field
35
+ = f.label :description
36
+ = f.text_area :description, :class => [ :tinymce ]
33
37
 
34
38
  .field
35
39
  %label Calendar
@@ -10,7 +10,7 @@
10
10
 
11
11
  .a
12
12
  = f.label :descr
13
- = f.text_area :descr
13
+ = f.text_area :descr, :class => [ :tinymce ]
14
14
 
15
15
  .a
16
16
  coords
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.23
4
+ version: 0.1.8.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox