Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…or ironruby mvc
  • Loading branch information...
commit db205c9ab7d946bc39c63423a0288b9f8b44b187 1 parent c6cb7e7
@casualjim casualjim authored
View
20 IronRubyMvc/Helpers/RubyInputHelper.cs
@@ -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());
}
-
-
}
}
View
36 IronRubyMvc/Helpers/RubyValidationHelpers.cs
@@ -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());
}
}
}
View
6 IronRubyMvc/System.Web.Mvc.IronRuby.csproj
@@ -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">
View
0  VS Templates/IronRubyMvcController.zip → ...emplates/File templates/IronRubyMvcController.zip
File renamed without changes
View
0  VS Templates/RubyActionFilter.zip → VS Templates/File templates/RubyActionFilter.zip
File renamed without changes
View
0  VS Templates/RubyAuthorizationFilter.zip → ...plates/File templates/RubyAuthorizationFilter.zip
File renamed without changes
View
0  VS Templates/RubyExceptionFilter.zip → VS Templates/File templates/RubyExceptionFilter.zip
File renamed without changes
View
0  VS Templates/RubyResultFilter.zip → VS Templates/File templates/RubyResultFilter.zip
File renamed without changes
View
0  VS Templates/RubyRoutes.zip → VS Templates/File templates/RubyRoutes.zip
File renamed without changes
View
BIN  VS Templates/Project template/IronRubyMvcTemplate.zip
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.