appointments 1.0.15 → 1.2.0

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.
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "appointments"
5
- s.version = "1.0.15"
5
+ s.version = "1.2.0"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.summary = "Schedule appointments with Rails 3 and the jQuery-UI"
8
8
  s.email = "mleveton@prepcloud.com"
@@ -5,6 +5,13 @@ module Appointments
5
5
  desc "Creates an appointment initializer and copies locale files to your application."
6
6
  class_option :orm
7
7
 
8
+ def add_captivate_routes
9
+ resources = "resources :appointments"
10
+ match_dates = "match 'appointments/match_dates' => 'appointments#match_dates'"
11
+ route resources
12
+ route match_dates
13
+ end
14
+
8
15
  def add_model
9
16
  template "appointment.rb", "app/models/appointment.rb"
10
17
  end
@@ -18,7 +25,7 @@ module Appointments
18
25
  end
19
26
 
20
27
  def add_controller
21
- template "appointments_controller.rb", "app/controllers/appointmentss_controller.rb"
28
+ template "appointments_controller.rb", "app/controllers/appointments_controller.rb"
22
29
  end
23
30
 
24
31
  def add_javascripts
@@ -30,9 +37,5 @@ module Appointments
30
37
  template "jquery-ui-1.8.17.custom.css", "public/jquery-ui-1.8.17.custom.css"
31
38
  end
32
39
 
33
- def add_captivate_routes
34
- match_dates = "match 'appointments/match_dates' => 'appointments#match_dates'"
35
- route match_dates
36
- end
37
40
  end
38
41
  end
@@ -20,14 +20,14 @@ def new
20
20
  def create
21
21
  @appointment = Appointment.create(params[:appointments])
22
22
  if @appointment.save
23
- redirect_to root_path
23
+ redirect_to new_appointment_path
24
24
  else
25
25
  err = ''
26
26
  @appointment.errors.full_messages.each do |m|
27
27
  err << m
28
28
  end
29
29
 
30
- redirect_to root_path, :flash => { :alert => "#{err}, please try again" }
30
+ redirect_to new_appointment_path, :flash => { :alert => "#{err}, please try again" }
31
31
  end
32
32
  end
33
33
  end
@@ -45,7 +45,7 @@
45
45
  </tr>
46
46
 
47
47
  <tr class = "cal_table3">
48
- <td class = 'cal_previous'><form method='link' action="<% root_path %>"><button class='btn'>&#60;&#60; previous page</button></form></td>
48
+ <td class = 'cal_previous'><form method='link' action="<%= new_appointment_path %>"><button class='btn'>&#60;&#60; previous page</button></form></td>
49
49
  </tr>
50
50
  </table>
51
51
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appointments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &17394160 !ruby/object:Gem::Requirement
16
+ requirement: &17048220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17394160
24
+ version_requirements: *17048220
25
25
  description: Schedule appointments with Rails 3 and the jQuery-UI
26
26
  email: mleveton@prepcloud.com
27
27
  executables: []
@@ -33,7 +33,7 @@ files:
33
33
  - README
34
34
  - README.rdoc
35
35
  - Rakefile
36
- - appointments-1.0.14.gem
36
+ - appointments-1.0.15.gem
37
37
  - appointments.gemspec
38
38
  - lib/generators/appointments/install/install_generator.rb
39
39
  - lib/generators/appointments/templates/appointment.js