Permalink
Browse files

Fixed a bug with the validation helper. Added a VS project template f…

…or ironruby mvc
  • Loading branch information...
1 parent c6cb7e7 commit db205c9ab7d946bc39c63423a0288b9f8b44b187 @casualjim casualjim committed Mar 26, 2009
@@ -1,19 +1,23 @@
+#region Usings
+
using System.Web.Mvc.Html;
using System.Web.Mvc.IronRuby.Extensions;
using IronRuby.Builtins;
+#endregion
+
namespace System.Web.Mvc.IronRuby.Helpers
{
public partial class RubyHtmlHelper
{
public string CheckBox(string name)
{
- return _helper.CheckBox(name, (object)null /* htmlAttributes */);
+ return _helper.CheckBox(name, (object) null /* htmlAttributes */);
}
public string CheckBox(string name, bool isChecked)
{
- return _helper.CheckBox(name, isChecked, (object)null /* htmlAttributes */);
+ return _helper.CheckBox(name, isChecked, (object) null /* htmlAttributes */);
}
public string CheckBox(string name, bool isChecked, Hash htmlAttributes)
@@ -26,14 +30,14 @@ public string CheckBox(string name, Hash htmlAttributes)
return _helper.CheckBox(name, htmlAttributes.ToDictionary());
}
- public string Hidden(string name)
+ public string Hidden(string name)
{
return _helper.Hidden(name, null /* value */);
}
public string Hidden(string name, object value)
{
- return _helper.Hidden(name, value, (object)null /* hmtlAttributes */);
+ return _helper.Hidden(name, value, (object) null /* hmtlAttributes */);
}
public string Hidden(string name, object value, Hash htmlAttributes)
@@ -48,7 +52,7 @@ public string Password(string name)
public string Password(string name, object value)
{
- return _helper.Password(name, value, (object)null /* htmlAttributes */);
+ return _helper.Password(name, value, (object) null /* htmlAttributes */);
}
public string Password(string name, object value, Hash htmlAttributes)
@@ -58,7 +62,7 @@ public string Password(string name, object value, Hash htmlAttributes)
public string RadioButton(string name, object value)
{
- return _helper.RadioButton(name, value, (object)null /* htmlAttributes */);
+ return _helper.RadioButton(name, value, (object) null /* htmlAttributes */);
}
public string RadioButton(string name, object value, Hash htmlAttributes)
@@ -68,7 +72,7 @@ public string RadioButton(string name, object value, Hash htmlAttributes)
public string RadioButton(string name, object value, bool isChecked)
{
- return _helper.RadioButton(name, value, isChecked, (object)null /* htmlAttributes */);
+ return _helper.RadioButton(name, value, isChecked, (object) null /* htmlAttributes */);
}
public string RadioButton(string name, object value, bool isChecked, Hash htmlAttributes)
@@ -95,7 +99,5 @@ public string TextBox(string name, object value)
name = name.Replace("_", "");
return _helper.TextBox(name, value.ToString());
}
-
-
}
}
@@ -1,62 +1,50 @@
+#region Usings
+
using System.Collections.Generic;
using System.Web.Mvc.Html;
using System.Web.Mvc.IronRuby.Extensions;
using System.Web.Routing;
using IronRuby.Builtins;
+#endregion
+
namespace System.Web.Mvc.IronRuby.Helpers
{
public partial class RubyHtmlHelper
{
-
public string ValidationMessage(string modelName)
{
- return ValidationMessage(modelName, (object)null /* htmlAttributes */);
+ return _helper.ValidationMessage(modelName);
}
- public string ValidationMessage(string modelName, object htmlAttributes)
+ public string ValidationMessage(string modelName, Hash htmlAttributes)
{
- return ValidationMessage(modelName, new RouteValueDictionary(htmlAttributes));
+ return _helper.ValidationMessage(modelName, htmlAttributes.ToDictionary());
}
public string ValidationMessage(string modelName, string validationMessage)
{
- return ValidationMessage(modelName, validationMessage, (object)null /* htmlAttributes */);
- }
-
- public string ValidationMessage(string modelName, string validationMessage, object htmlAttributes)
- {
- return ValidationMessage(modelName, validationMessage, new RouteValueDictionary(htmlAttributes));
- }
-
- public string ValidationMessage(string modelName, IDictionary<string, object> htmlAttributes)
- {
- return ValidationMessage(modelName, null /* validationMessage */, htmlAttributes);
+ return _helper.ValidationMessage(modelName, validationMessage);
}
public string ValidationMessage(string modelName, string validationMessage, Hash htmlAttributes)
{
- return _helper.ValidationMessage(modelName, validationMessage, htmlAttributes.ToRouteDictionary());
+ return _helper.ValidationMessage(modelName, validationMessage, htmlAttributes.ToDictionary());
}
public string ValidationSummary()
{
- return ValidationSummary(null /* message */);
+ return _helper.ValidationSummary();
}
public string ValidationSummary(string message)
{
- return ValidationSummary(message, (object)null /* htmlAttributes */);
- }
-
- public string ValidationSummary(string message, object htmlAttributes)
- {
- return ValidationSummary(message, new RouteValueDictionary(htmlAttributes));
+ return _helper.ValidationSummary(message);
}
public string ValidationSummary(string message, Hash htmlAttributes)
{
- return _helper.ValidationSummary(message, htmlAttributes.ToRouteDictionary());
+ return _helper.ValidationSummary(message, htmlAttributes.ToDictionary());
}
}
}
@@ -119,8 +119,14 @@
<Compile Include="Helpers\DescriptorUtil.cs" />
<Compile Include="Helpers\HashWrapper.cs" />
<Compile Include="Extensions\Inflector.cs" />
+ <Compile Include="Helpers\RubyFormHelper.cs" />
<Compile Include="Helpers\RubyHtmlHelper.cs" />
+ <Compile Include="Helpers\RubyInputHelper.cs" />
+ <Compile Include="Helpers\RubyLinkHelper.cs" />
+ <Compile Include="Helpers\RubySelectHelper.cs" />
+ <Compile Include="Helpers\RubyTextAreaHelper.cs" />
<Compile Include="Helpers\RubyUrlHelper.cs" />
+ <Compile Include="Helpers\RubyValidationHelpers.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Extensions\IDictionaryExtensions.cs" />
<Compile Include="ViewEngine\RubyScriptBlock.cs">
Binary file not shown.

0 comments on commit db205c9

Please sign in to comment.