shaml 0.5.0.rc → 0.5.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.
@@ -12,7 +12,9 @@ namespace WebBase.Core
12
12
  public WebSample() { }
13
13
 
14
14
  // __BEGIN__PROPERTY__
15
+ [NotNull]
15
16
  public virtual PropertyType Property { get; set; }
17
+
16
18
  // __END__PROPERTY__
17
19
  }
18
20
  }
@@ -2,6 +2,7 @@
2
2
  <%@ Import Namespace="WebBase.Controllers" %>
3
3
  <%@ Control Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewUserControl<WebBase.Controllers.WebSamplesController.WebSampleFormViewModel>" %>
4
4
 
5
+ <% Html.EnableClientValidation(); %>
5
6
  <%= Html.ValidationSummary() %>
6
7
  <% using (Html.BeginForm()) { %>
7
8
  <% // Html.AntiForgeryToken() %>
@@ -11,8 +12,8 @@
11
12
  <li>
12
13
  <label for="WebSample_Property">Property:</label>
13
14
  <div>
14
- <%= Html.TextBox("WebSample.Property", (Model.WebSample != null) ? Model.WebSample.Property.ToString() : "" ) %>
15
- <%= Html.ValidationMessage("WebSample.Property") %>
15
+ <%= Html.TextBoxFor(x => x.WebSample.Property ) %>
16
+ <%= Html.ValidationMessageFor(x => x.WebSample.Property) %>
16
17
  </div>
17
18
  </li>
18
19
  <!-- __END__PROPERTY__ -->
@@ -158,7 +158,7 @@ namespace WebBase.Controllers
158
158
  public WebSample WebSample { get; internal set; }
159
159
  }
160
160
 
161
- private readonly IRepository<WebSample> WebSampleRepository;
161
+ private readonly INHibernateQueryRepository<WebSample> WebSampleRepository;
162
162
  }
163
163
  }
164
164
 
@@ -106,7 +106,8 @@ namespace Tests.Blog.Web.Controllers
106
106
  private INHibernateQueryRepository<WebSample> CreateMockWebSampleRepository() {
107
107
 
108
108
  INHibernateQueryRepository<WebSample> mockedRepository = MockRepository.GenerateMock<INHibernateQueryRepository<WebSample>>();
109
- mockedRepository.Expect(mr => mr.GetAll()).Return(CreateWebSamples());
109
+ long outres;
110
+ mockedRepository.Expect(mr => mr.GetAll(0, 0, out outres, null)).IgnoreArguments().Return(CreateWebSamples());
110
111
  mockedRepository.Expect(mr => mr.Get(1)).IgnoreArguments().Return(CreateWebSample());
111
112
  mockedRepository.Expect(mr => mr.SaveOrUpdate(null)).IgnoreArguments().Return(CreateWebSample());
112
113
  mockedRepository.Expect(mr => mr.Delete(null)).IgnoreArguments();
@@ -1,6 +1,7 @@
1
1
  @namespace=WebBase.Controllers
2
2
  @type=WebSamplesController.WebSampleFormViewModel
3
3
  = Html.ValidationSummary()
4
+ - Html.EnableClientValidation();
4
5
  - using (Html.BeginForm())
5
6
  /= Html.AntiForgeryToken()
6
7
  = Html.Hidden("WebSample.Id", (Model.WebSample != null) ? Model.WebSample.Id : 0)
@@ -9,9 +10,10 @@
9
10
  %li
10
11
  %label{ for="WebSample_Property" }Property:
11
12
  %div
12
- = Html.TextBox("WebSample.Property", (Model.WebSample != null) ? Model.WebSample.Property.ToString() : "" )
13
- = Html.ValidationMessage("WebSample.Property")
13
+ = Html.TextBoxFor( x => x.WebSample.Property )
14
+ = Html.ValidationMessageFor( x => x.WebSample.Property )
14
15
  // __END__PROPERTY__
15
16
  %li
16
17
  %input{ type="submit" name="btnSave" value="Save WebSample"}/
17
18
  %button{ name="btnCancel" onClick="window.location.href = '/WebSamples';"} Cancel
19
+
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shaml
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
8
  - 0
9
- - rc
10
- version: 0.5.0.rc
9
+ version: 0.5.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Zsolt Sz. Sztupak
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-04-15 00:00:00 +02:00
17
+ date: 2010-04-20 00:00:00 +02:00
19
18
  default_executable: shaml
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency