similar to: using helpers

Displaying 20 results from an estimated 100000 matches similar to: "using helpers"

2025 Jan 16
1
Problems with rpcd helpers not restarting after config changes and updates
Hello lovely samba-people, in the last year we had some problems with the rpcd helpers: they dont restart after a config change or an upgrade. We think https://lists.samba.org/archive/samba/2024-July/249470.html is a symptom of it. Other errors included that samba-ad-dc did not work properly until restarting the whole server. The upgrade to 4.21.3 took down our whole ERP software, because
2006 Aug 03
3
helpers: newbie problem
please help me with my code: im calling a helper, which has to return different links. --list.rhtml ... <% for message in @messages %> <tr> <td><%= message.author.send(''name'') %></td> <td><%= message.send(''date'').strftime("%d.%m.%y/%H.%M.%S") %></td> <td><%=
2006 Jul 24
3
administration tutorial
hi! im learning how to work with sessions. i made a prretty simple login system, but i havent found a good tutorial to make a login system with permissions (admin can delete,edit,etc) other users only read, edit, etc do u know where can i find some info/tutorial about that? ty!! -- Posted via http://www.ruby-forum.com/.
2010 Sep 24
0
Rails 3, using helpers in controller
Hi everyone, is there any way how to use Helpers in Controllers in Rails 3? I was trying to google about it, but no luck. In old Rails times (2.x) we were using something like this. my_active_record_object.variable = "This is the message body:<br /><br /> #{@template.simple_format(params["message"])}" point is that when we wanted to attach text from Text Area to
2019 Apr 30
0
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
Hi, thanks for the feedback. Am 29.04.19 um 21:58 schrieb Sam Ravnborg: > Hi Thomas. > > Some minor things and some bikeshedding too. > > One general^Wbikeshedding thing - unint32_t is used in many places. > And then s64 in one place. > Seems like two concepts are mixed. > Maybe be consistent and use u32, s32 everywhere? The DRM API already has a mixture of such types
2006 Aug 09
2
newbie problem with FIND
hi! how can i find an ID from a table, with another attribute? i mean, i have the table users, with id, and name, and i want to find the id, where the name is. i know only the way with the id.. @something = User.find(params[:id]) which would be the correct syntax? ty!! -- Posted via http://www.ruby-forum.com/.
2006 Feb 21
0
components using helpers
Is it by design that my custom components aren''t able to pick up my custom helpers defined in module ApplicationHelper, or am I missing something? This doesn''t really make sense to me, as components are intended to function like sub-actions... so their views should automatically pick up ApplicationHelper. Thanks, Mike
2006 May 21
0
UL/LI List helpers, or not?
Hello, I have a (bad) habit of abstracting nearly all my code. The DRY idea helps a lot. What I want is a simple helper to build UL LI lists: def unordered_list_tag(items => [], options => {}) if :items.count > 0 render :partial => ''application/unordered_list'', :locals => { items => :items, options => :options } end end And a simple
2010 Nov 19
0
how to include view helpers in both action_controller and action_mailer templates (rails 3)
There''s some terse documentation that helpers can be shared between action_controller and action_mailer, but I have yet to find an example of how this is done. Right now, I''m trying to use a "markdown" method in the view templates for both. I have put the method in the application helper (app/helpers/application_helper.rb). It works in the view templates called from
2006 Mar 11
3
Helper methods for ActiveRecord
Hi all, I have several models which all have an email field. This email address should of course be validated and for that I have this nice regex. But now I have the email validation method copied throughout my different models. Which is clearly stupid. I figured I needed a helper (module?) and use this helper I my models. But I can''t seem to find anyway of helpers for models, only
2007 Nov 03
1
Specs for Helpers that call render
The helper spec I am writing tests a helper method that calls render. ## module HelperHelper def render_partial render :partial => ''partial'' end end ## The helper spec. ## describe HelperHelper do it "should render partial" do render_partial.should_not == nil end end ## The output generated ## $ spec spec/helpers/home_helper_spec.rb .F 1)
2006 Jul 27
4
problem with elsif
hi! i have a little problem, im working with permissions, so if u are a normal user, u can only view something and admins can view,edit, delete i pick up the level, and then i check up, if the level is right, and then i put the options. but i dont know why, the admin can only view and delete, i mean my code only take the last link_to here is the code: <%= link_to "read",
2008 Jan 25
1
form error with datetime select
Hi, Im trying to build a form using: <% facebook_form_for(:task, at task,:url => create_task_path) do |f| %> Assign Task To: <%= fb_friend_selector %> <%=f.text_field :ttype, :label=> "Title"%> <%=f.datetime_select :duedate, :label=> "Due Date"%> <%=f.buttons "Add" %> <% end %> But im getting an
2008 Nov 19
0
Helpers in lib
Hi all, I have a query about how to access helper methods in a library. I''m trying to create a custom liquid drop thing which has a form in it (a poll), and I''m unable to get form_for to work with "vote_poll_path". Here''s my code for the custom drop (this is in a file in lib): def render(context) @vote = Vote.new(:poll_id => @poll.id) output =
2005 Dec 27
0
Re: RESOLVED: Overloading error_message_on method in ActiveRecordHelper
Leaving the body of the method the same as the default still throws the "stack level too deep" error. As a matter of fact, it only disappears if I comment out the ''require'' in line 1. As it turned out, it was the method definiton itself that caused problems. Ruby doesn''t have keyword arguments, but I tried calling the method as if it had. But when I changed
2007 May 17
4
How to mock helpers in view specs ?
Hi all, I am mocking the following Rails view (inside a partial): <%= render :partial => "forums/forum", :collection => forum_category.forums.readable_by(current_user? ? current_user : nil) %> My spec fails with the following message: 1) ActionView::TemplateError in ''forum_categories/index (anonymous user) should only render forums accessible to anonymous
2006 Nov 16
0
helpers not rendered in views?
https://rubyforge.org/tracker/index.php? func=detail&aid=6713&group_id=797&atid=3150 I''m not sure if this is true of all helper methods but it is for the following. In this case the forn_remote_tag is rendered as an empty line. Apprently helpers are not rendered in view tests... template _xyz: <div> <% form_remote_tag :update => "some_div", :url
2017 Jan 16
0
[PATCH 0/4] Allow ASYNC flip with atomic helpers.
Hi Harry, On Monday 16 Jan 2017 16:13:39 Harry Wentland wrote: > On 2017-01-16 03:39 PM, Laurent Pinchart wrote: > > On Monday 16 Jan 2017 10:44:54 Andrey Grodzovsky wrote: > >> This series is a folow-up on > >> https://patchwork.kernel.org/patch/9501787/ > >> > >> The first patch makes changes to atomic helpers > >> to allow for drives with
2008 Jan 16
2
redirecto_to within helpers
Hi all, In one of my helpers I would like to call a redirect_to(url) action. I know the helpers are supposed almost only for formatting the view purposes but it''s the best way I have found to do what I want. If I call the redirect_to action in a helper I get the error: undefined method `redirect_to'' for #<#<Class:0x23aaedc>:0x23aaeb4> any solution for this?
2006 Apr 24
1
using helper which is placed outside of /app/helpers????
Hi, WE wanted to load a helper outside of app/helpers. Actually our helpers is placed in lib/commoncode/ for the ruby classes, we can simply use require "commoncode/myclass", but we can not do the same things with the helpers, we try: helper ''commoncode/ourhelpername'' -> error helper :commoncode/ourhelpername -> error Does someone know how to do this???