actionviewhelper Questions

1

Solved

Let's say I have a form built with Rails form builder. It has a text field, and I want to dynamically update the input field's value using AJAX and turbo streams. Is it possible to update the same ...
Unfrock asked 22/7, 2023 at 12:36

5

Solved

I am working on cleaning up some code that relies on some custom controller helper methods, by creating a "plain old Ruby" presenter object. In my controller, I am able to pass the view context to ...
Vaccinate asked 9/1, 2015 at 22:56

4

I have to render some templates and send the HTML block to SendGrid for email substitution. So, unfortunately, I am doing some rendering in model like this: view = ActionView::Base.new(Rails.conf...

4

Solved

I'm using 'time_ago_in_words' function in a view, and I need to test the output in the FunctionalTest. But the test can not see 'time_ago_in_words' helper function. What should I do in order to u...
Lynea asked 11/2, 2010 at 16:9

4

Solved

What am I missing here? I am working with Rails 4.0.0 and trying out the new Bootstrap 3.0.0rc1. I have a simple 'recipe box' app that has a Recipe model and a Category model that feeds a 'category...
Gobioid asked 10/8, 2013 at 15:53

2

Solved

How to include Rails view helpers to be accesible by assets pipeline execution context? An example use case would be to generate the markup for a form, using form_tag helper method, and make it a...
Ozellaozen asked 11/1, 2013 at 18:19

3

Solved

I'm trying my best to build a helper that outputs a <'ul> consisting of all the members of a collection. For each member of the collection I want to print out a <'li> that has a title, and a ...
Tena asked 24/8, 2010 at 21:39

2

Solved

Probably something wrong with my setup: irb(main):001:0> truncate("Once upon a time in a world far far away", :length => 17) NoMethodError: undefined method `truncate' for main:Object from ...
Honna asked 17/10, 2012 at 20:28

1

Solved

I am working with rails 4.2.x and Mongoid . I am getting the following error when I try to run server in production mode ,but it runs smoothly on development mode, not sure why I am getting this er...
Preshrunk asked 24/3, 2015 at 7:30

5

Solved

I have this problem all the time in my rails apps and I still need the correct solution. Whenever a user edits their own record the password field is being populated. I suspect its Firefox as setti...
Derange asked 14/10, 2009 at 16:25

2

Solved

I am looking to use ActionView::Helpers::NumberHelper from a Ruby script. What all do I need to require etc.?
Piscatelli asked 28/7, 2011 at 0:53

4

I'm working with an app for a concert tour website, where all times (announcement times, on-sale start times, and event start times) are local to each particular venue's time zone. I take the user ...
Pontifical asked 6/6, 2011 at 1:4

5

Solved

I'm trying to get the ActionView-Helper collection_select to take a value that will be preselected in the dropdown-menu. Neither (:selected in the html-option-hash) <%= collection_select(:my_o...
Grigsby asked 19/6, 2009 at 16:19

1

Solved

I'd like to have the following directory structure: views/ app1/ users/_user.html.erb users/index.html.erb app2/ users/index.html.erb shared/ users/_user.html.erb users/index.html.erb ...

1

Solved

I am trying to humanize the symbols that are the keys for a hash c.each_key{ |f| humanize(f.to_s)} but for some reason, i get an error like so ActionView::Template::Error (undefined method 'huma...
Dyanna asked 6/1, 2011 at 20:52

2

Solved

How can I execute a image_tag method in a Rails console Run the console $ rails c Load helpers include ActionView::Helpers Execute the command image_tag('test.png') I got a strange erro...
Ectophyte asked 4/11, 2010 at 20:16

1

Solved

I'm somewhat of a Rails newbie. I'm writing a couchrest-rails app, so am not using activerecord for this model. I just figured out that that means that form_for(@model) won't work. I'm trying ...
Grinnell asked 13/8, 2009 at 16:57
1

© 2022 - 2024 — McMap. All rights reserved.