Displaying 20 results from an estimated 7000 matches similar to: "Helpers in lib"
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
Hey All,
I''m trying to play along w/the ''complex forms 1'' railscast
(http://railscasts.com/episodes/73) and having trouble. The view is
projects/new. I''m trying to add some project_people to the form w/code
like so:
<% form_for(@project) do |f| %>
[project stuff here]
<% for pp in @project.project_person %>
<% fields_for
2018 Sep 09
0
[PATCH net-next v8 5/7] net: vhost: introduce bitmap for vhost_poll
On Tue, Aug 21, 2018 at 8:45 AM Jason Wang <jasowang at redhat.com> wrote:
>
>
>
> On 2018?08?19? 20:11, xiangxia.m.yue at gmail.com wrote:
> > From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> >
> > The bitmap of vhost_dev can help us to check if the
> > specified poll is scheduled. This patch will be used
> > for next two patches.
> >
2010 Aug 18
2
auth logic - password confirmation
Hi, newbie here. :)
i have this form on a test rails app:
<% form_for @user do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :username %><br />
<%= f.text_field :username %>
</p>
<p>
<%= f.label :email %><br />
<%= f.text_field :email %>
</p>
<p>
<%= f.label :password %><br
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi,
Its taking me a long time to get my head around the Liquid plugin. I
have a couple of questions which hopefully someone can help me with...
- How difficult would it be to add some kind of Filter or Tag which
would allow other Liquid templates to be included into the current
Liquid template (eg. similar to render(:file => "filename")
- How difficult would it be to add
2006 Mar 19
3
String keys in hash
Hi all,
My app is going to count sth based on poll id in the url. The url
looks like:
http://address.com?id=dwNKiItvcyrQ5sycnIhmJablDfXsc9tshaGIVyNIei7.e7&some_other_parameters
In a controller, I''ve created a hash where the keys are the ids:
@codes = {
''dwNKiItvcyrQ5sycnIhmJablDfXsc9tshaGIVyNIei7.e7'' =>
{:partner_id => 0,
2011 Nov 01
2
Railscast 262 different partial in helper
Hi RoR Community,
in Ryan Bates Railscasts Episode #262 he put the index code
<% for message in @messages %>
<div class="message">
<div class="created_at"><%= message.created_at.strftime("%B %d, %Y")
%></div>
<div class="content">
<%= message.content %>
</div>
<div
2008 Sep 02
2
Needing a (better) Selenium Testing Tutorial
Hi everybody, it''s time to begin testing stage on the application we
are doing.
I''ve seen RailsCast episode about the subject (http://railscasts.com/
episodes/116) which is actually very instructive, but I want to know
if there are out there any compliment tutorial or doc to dig deeper.
A lot of peace and thanks for your assistance.
Paco
2007 Apr 03
3
end_form_tag
In my logs I can see that end_form_tag is being deprecated. I wanted to
make the switch now but cannot get the new end tag to work.
THIS WORKS:
<%= form_remote_tag :url =>{:action => "next_question",
:kwiz_id => @kwiz.id,
:position => @next_position} %>
<% @question.choices.each do
2007 Oct 17
2
Complex Forms (From Railscasts.com)
Hi,
I have been watching the last three episodes on railscasts.com in
which he goes through dealing with multiple models in one for using
fields_for, and virtual attributes. (http://railscasts.com/episodes/
73). Here is an example of the way they suggest to go about it:
# projects_controller.rb
def new
@project = Project.new
3.times { @project.tasks.build }
end
def create
@project =
2007 Nov 01
0
Using view helpers from a controller
Hi,
I want to access a view helper from a controller.
(Of course, you all want to know why??? -- See below.)
To be specific, I want to access methods such as
ActionView::Helpers::FormTagHelper -- form_tag and text_field_tag
from either a controller or from a new class (in models? or lib?).
If I create the new class then that class''s methods need to also be able
to access the
2007 Aug 09
7
Integrating polymorphic models into controllers views? how?
I''m having trouble trying to get this to work.
How the heck do you get a polymorphic controller to work? Especially
integrating it with a view?
Let''s say that we have shows, and episodes, then comments.
A show has many episodes, an episode has many comments.
the route is /shows/1/episodes/1/
Now to add a comment to that episode, how would I do it? Let''s say
that the
2010 Feb 09
2
undefined method `generate_token'
Hi Everyone...
I''m following a railscast episode on how to implement an invitation
feature.
It''s going really well, but i''ve hit a minor snag that I cant get
over..
undefined method `generate_token'' for #<Invitation:0x2563bf8>
The invite form allows me to check for a user, and whether they
already have registered. If they have, the invitation is not
2010 Jul 19
1
instance_exec routes -> form helpers
The new router in Rails 3 is clean and concise and marks the
acceptance of instance_exec as a method for writing a gorgeous DSL.
I''m wondering should something similar be applied to the default form helpers?
Moving from this:
<%= form_for(@post) do |f| %>
<%= f.text_field :title %>
<% end %>
to this:
<%= form_for(@post) do %>
<%= text_field :title %>
2008 Oct 24
4
Railscast 75, Observe_field and Shopping Cart
Hi all,
I have the shopping cart page where a user can add items dynamically
through ajax as explained in Railscast episode 75. I am using
observe_field to observe the ''quantity'' and ''cost'' fields to update
the total field for each item.
This does not work however, for records that are added through the
Ajax. How can i name the fields and observe them as i have
2010 Dec 23
0
has_many :through full stack help
I am trying to implement HMT for the first time and having a ton of
trouble. I would like to be able to have the user check a checkbox
and fill some extra fields for data input. I have tried so many
iterations borrowed from different places I found on the web, none
seem to work quite right. Essentially I have two models: ''practice''
and ''system'' where a
2013 Jan 22
1
rails datatables refresh javascript
Hi
I followed a railscast episode and got datatables up and running,
beautifully along with the nice jquery-ui as in the front page.
The main issue I''m having though is that I suck at CoffeeScript/JS ~_~
I''m trying get the datatables to reload every 1 second but I don’t see any
request coming into my webserver for refreshes and hence, no refreshes on
the web page itself.
2006 Feb 16
9
rake migrate HANGS
I have been attempting to use migrations as a build a poll app.
I have created the initial file:
-----------------
class CreateTablePollsAndPollOptions < ActiveRecord::Migration
def self.up
create_table polls do |table|
table.column ''question'', :string
table.column ''user_id'', :integer
table.column ''start_time'',
2010 Dec 25
1
Advanced search without database
Hello guys,
Im trying to make an advanced search form, actually i did like Ryan Bates
teaches in this railscast :
http://railscasts.com/episodes/111-advanced-search-form
But my problem is that i dont want to save the searches in my database and i
dont know how to do this...
In the railscast, there was a comment like this:
*14. Karl <http://www.vbsfinder.com/> May 26, 2008 at 23:01 *
2013 Feb 12
2
Rails parameters get lost because of jQuery link
(Original
post: http://stackoverflow.com/questions/14569721/rails-parameters-get-lost-because-of-jquery-link,
unfortunately no response)
I saw this Railscast (
http://railscasts.com/episodes/240-search-sort-paginate-with-ajax) the
other day and wanted to use the techniques for an application of mine. I
have a page with elements on it and I want to sort them by values and
select them by tags.
2010 Dec 21
0
liquid include error please help
Hi All,
I have been trying to get my following code working for almost 4 days
and glad if you could help me.
Basically what I want to do is to use liquid ''include'' tag
I''m getting this error
Liquid error: No such template ''test''
my code is as follows
in my app/views/page/index.erb
<%
file_system =