appointments 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.2.0"
5
+ s.version = "1.2.1"
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"
@@ -7,9 +7,7 @@ module Appointments
7
7
 
8
8
  def add_captivate_routes
9
9
  resources = "resources :appointments"
10
- match_dates = "match 'appointments/match_dates' => 'appointments#match_dates'"
11
10
  route resources
12
- route match_dates
13
11
  end
14
12
 
15
13
  def add_model
@@ -7,8 +7,7 @@ $(function () {
7
7
 
8
8
  function findHours(current_date){
9
9
  $.ajax({
10
- type: "POST",
11
- url: "match_dates",
10
+ url: "/../appointments",
12
11
  cache: false,
13
12
  data: {matched_date:current_date},
14
13
  success: function(html){
@@ -1,5 +1,5 @@
1
1
  class Appointment < ActiveRecord::Base
2
- attr_accessible :date, :hour
2
+ attr_accessible :date, :hour, :done
3
3
 
4
4
  validates :date, :presence => true
5
5
  validates :hour, :presence => true,
@@ -1,6 +1,6 @@
1
1
  class AppointmentsController < ApplicationController
2
2
 
3
- def match_dates
3
+ def index
4
4
  date_from_ajax = params[:matched_date]
5
5
  reduce = Appointment.where(:date => date_from_ajax)
6
6
  hour_on_date = reduce.collect {|x| x.hour}
@@ -45,12 +45,12 @@
45
45
  </tr>
46
46
 
47
47
  <tr class = "cal_table3">
48
- <td class = 'cal_previous'><form method='link' action="<%= new_appointment_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'>back</button></form></td>
49
49
  </tr>
50
50
  </table>
51
51
  </div>
52
52
 
53
- <div id='cal_previous2'><button class='btn' onclick='prevPage();'>&#60;&#60; previous page</button></div><br />
53
+ <div id='cal_previous2'><button class='btn' onclick='prevPage();'>back</button></div><br />
54
54
 
55
55
  <div id="appointment_form">
56
56
  <%=form_tag(@appointments) %>
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.2.0
4
+ version: 1.2.1
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: &17048220 !ruby/object:Gem::Requirement
16
+ requirement: &15895940 !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: *17048220
24
+ version_requirements: *15895940
25
25
  description: Schedule appointments with Rails 3 and the jQuery-UI
26
26
  email: mleveton@prepcloud.com
27
27
  executables: []
@@ -33,16 +33,16 @@ files:
33
33
  - README
34
34
  - README.rdoc
35
35
  - Rakefile
36
- - appointments-1.0.15.gem
36
+ - appointments-1.2.0.gem
37
37
  - appointments.gemspec
38
38
  - lib/generators/appointments/install/install_generator.rb
39
39
  - lib/generators/appointments/templates/appointment.js
40
40
  - lib/generators/appointments/templates/appointment.rb
41
41
  - lib/generators/appointments/templates/appointments_controller.rb
42
+ - lib/generators/appointments/templates/index.html.erb
42
43
  - lib/generators/appointments/templates/jquery-ui-1.8.17.custom.css
43
44
  - lib/generators/appointments/templates/jquery.ui.datepicker.min.js
44
45
  - lib/generators/appointments/templates/jquery.ui.widget.min.js
45
- - lib/generators/appointments/templates/match_dates.html.erb
46
46
  - lib/generators/appointments/templates/new.html.erb
47
47
  - test/test_appointments.rb
48
48
  homepage: https://github.com/Leveton/appointments