Top "Helper" questions

Additional functionality not defined in a class that the helper operates on.

How do I use UrlHelper from within a Razor helper?

I'm trying to create a Razor helper like this: @helper Render(IEnumerable<MyItem> items) { <ul> @foreach (…

asp.net-mvc razor helper
Rails : How to assign name and id to hidden_field_tag?

How to assign specific id and name to hidden_field_tag ? Like this, hidden_field_tag(:id => "page_no",:…

ruby-on-rails helper hidden-field
How to get Enum object by value in C#?

I recently encountered a case when I needed to get an Enum object by value (to be saved via EF …

c# object enums helper enumerable
Rails - How to add a format to an url helper?

how can I make an URL helper create an URL in a given request/response format? For example, in my …

ruby-on-rails request helper url-helper
Rendering templates within helpers in handlebars

Because there seem to be no answer on this: Passing variables through handlebars partial yet, I'm currently working on a …

html handlebars.js rendering helper templating
Using sanitize within a Rails controller

I'm trying to call sanitize within a controller. Here's what I tried: class FooController < ApplicationController include ActionView::Helpers::SanitizeHelper # ... …

ruby-on-rails controller helper sanitize
What are good uses for class helpers?

Delphi (and probably a lot of other languages) has class helpers. These provide a way to add extra methods to …

delphi class helper
How can I use the rails helper "distance_of_time_in_words" in plain old ruby (non-rails)

Rails has an helper which converts distance of time in words using distance_of_time_in_words What do I …

ruby datetime date time helper
how access to helper "current_user" in model rails?

I need to call current_user (define in ApplicationControler like an helper), in my User model. I test ApplicationController.helpers.…

ruby-on-rails-4 model controller helper
In Symfony, how can I use the url_for helper in a class?

I am building a URL inside of a class and I'd like to be able to change the routing if …

symfony1 routing symfony-1.4 helper