Displaying 20 results from an estimated 5000 matches similar to: "Understanding ActionPack"
2006 Mar 08
2
Upload progress update bar question
I''m trying to follow these instructions to include the Javascript
progress bar on a page. However, I''m confused.
In my controller, when I try to access
update_upload_progress_bar_js
which is defined in
actionpack/lib/action_view/helpers/upload_progress_helper.rb
I get a "no such method" error.
Can I use helpers in my controller class and, if so, how do I
2006 Mar 07
2
Using form_tag_with_upload_progress
All,
I''m attempting to use "form_tag_with_upload_progress"
http://railsmanual.org/module/ActionView::Helpers::UploadProgressHelper/form_tag_with_upload_progress
However, I''m having a hard time understanding what I''m supposed to
provide and where in order to take advantage of it. There''s a lot of
information and I''m sure I can figure it
2011 Dec 05
9
jquery - word is not defined
Just starting out with a beginner book on jquery and the very first thing I am trying fails (has to be me)
Rails 3.1 - other jquery things working including a poor example of drag & drop that is my ultimate target here but just simply trying to get every alternating row in a table to have a different css class
So I''m using...
app/assets/javascripts/people.js.coffee and put in...
2007 Dec 07
4
strange error on mock proxy
I''m banging my head over this really strange error in a view test when
I run "rake spec". The weird thing is that I don''t get the error when
I run the spec file by itself.
Here is the spec (I know, fixtures are the devil):
describe "/units/new.html.erb here" do
fixtures :units, :accounts, :groups
it_should_behave_like
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi ,
i''m having a problem with rendering a partial , the partial is in the
apps/view/polls folder with the name : _antwoorden_user.rhtml
in the view i''m rendering it with
<% if @user %>
<%= render :partial => ''polls/antwoorden_user'', :locals => {:poll =>
@poll, :user => @user} %>
<% else %>
....
gives me the error =>
No
2013 Mar 24
5
Rails 4.0 has_many_through and fields_for
Hi all, I am trying to reproduce rails 3.2 behaviour with fields_for and
nested attributes.
class ControllerAction < ActiveRecord::Base
has_many :interactions, dependent: :destroy
has_many :roles, through: :interactions
scope :controllers, lambda {|name| where("controller_name_id = ?",
name)}
scope :actions, lambda {|name| where("action_name_id =
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All,
I''m trying to do a simple form_for (and I also get it with form_tag)
and I''m getting the following error:
ActionView::TemplateError (No :secret given to the
#protect_from_forgery call. Set that or use a session store capable
of generating its own keys (Cookie Session Store).) on line #2 of
users/new.fbml.erb:
1: <h1>Welcome To Courses, Let''s Get
2007 May 30
2
ActionView::TemplateError
Hi,
I have a strange problem that only occurs on the production server.
I''ve been banging my head for hours trying to figure it out with no
success. Below is a copy of the error from the production log.
ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/
public/../config/../app/models/image.rb to define Image) on line #6 of
app/views/admin/design/_record.rhtml:
3:
2009 Jan 20
5
Problem running rake test
I''m using the One-click 1.8.7rc2 Ruby Windows installer, everything
has been working fine up till now, when i want to start getting into
testing, i got this error, any reason why?
C:/Ruby/bin/ruby -Ilib;test "C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb" "test/unit/word_test.rb"
C:/Ruby/lib/ruby/1.8/erb.rb:469:in `scan'': You have a
2007 Jul 06
3
stubbing helper methods for View specs
Hi there
I have several view specs, that include the following snippet in
their "before" block to stub the methods by acts_as_authenticated
before :each do
@u = mock_model(User)
@u.should_receive(:name).and_return("Hans Muster")
template.should_receive(:logged_in?).and_return(true)
template.should_receive(:current_user).and_return(@u)
end
this
2007 Jul 12
1
form_tag doesn't accept a string anymore in edge rails?
So, here''s the offending line. Note that I''m using edge rails.
form_tag verifications_path(@user), :method => :post do
verifications_path(@user) returns a string like "/users/3/
verifications". That eventually gets sent to url_for, which expects a
hash. And then it blows up.
It''s especially disconcerting since the documentation shows form_tag
as
2008 May 24
1
link_to_remote, image_tag, mouseover is this possible?
Hi guys,
I was wondering if you are able to have a link_to_remote, having an
image_tag and the link_to_remote has a mouseover event that updates a
div. Does the image_tag need the mouseover event? I currently have:
<%= link_to_remote(image_tag(@p_image.public_filename(:thumb)), :update
=> "big_pic", :onmouseover => {:action => :color_change, :id =>
@p_image.id})%>
2006 Aug 01
2
actionmailer cant find template in backgroundrb
Im trying to send mails from a backgroundrb worker and it seems like
ActionView cant find my template. same code works as a rake task.
here my worker:
class StatusMailWorker < BackgrounDRb::Rails
repeat 1.minutes # <-- hehe!
def do_work(args)
[...blah...]
NotificationMailer.create_daily_report(users, rep, items)
end
end
end
its throwing the following error:
No
2007 Jul 14
8
Specing Layouts
Hi,
I''ve just started to try and spec my application.html.erb layout as one of
the view specs but it totally barfs.
I''m guessing that it''s due to the yield statements in the layout.
Any clues as to how to proceed?
Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2009 Apr 04
11
rake aborted! undefined method `empty?' for nil:NilClass
Hi,
I''m getting the next errors, would anyone have any suggestions?
Thanks.
[~/rails/hip]# rake --trace db:migrate RAILS_ENV="production"
(in /home/domain/rails/hip)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `empty?'' for nil:NilClass
/usr/lib/ruby/1.8/erb.rb:469:in `scan''
2011 Oct 25
0
Sprocket Digest + Debug combination broken?
Hi all,
we''re just in the process of upgrading to the new asset pipeline, but I''m
having an annoying issue with Sprockets.
It turns out that I can''t enable both *debug* and *digest* in development
mode. When I do, I get a Errno::ENAMETOOLONG because the digest becomes the
*entire* *content* of the file instead of a hex. I get this with both sass
and javascript.
2006 Jun 05
1
Action Mailer contact form
I am trying to use Rails and the Action mailer to create a simple contact
form on a website. I am using a table-less model to validate the form
contents, then trying to use the Action Mailer chapter of the "Agile Web Development
with Rails" book as a pattern to develop the send e-mail portion. I am
having trouble getting it working and was hoping someone could point me in the
2006 Jun 16
2
Javascript error?
Hi, I''m trying to get this progress bar plugin working, but I''m
having some trouble.
I''m running Apache 2.0.52 with mod_fcgid on Mac OS X. Everything
seems to be working fine, but the progress bar simply doesn''t work.
In my log I get:
Multipart upload with progress (id: 1, size: 176731770)
Finished processing multipart upload in 18.96244s
but no requests in
2009 Dec 24
4
NoMethodError
Hi,
In a few words, can someone explain to me the NoMethodError. Googling
for answers will get you to something but a direct answer from experts
will give you something.
NoMethodError in Book#new
Showing app/views/book/new.html.erb where line #4 raised:
undefined method `title'' for #<Book id: nil, created_at: nil,
updated_at: nil>
Extracted source (around line #4):
1:
2006 Feb 21
2
ActiveRecord before_ callbacks question
Hi!
I need to set the primary key in a model and postgres table to something
different than id. View Edit and such works in the scaffolded
controller. However if I click in the controller below the list of data
onto New then I get an error message like this:
Showing app/views/admin/_form.rhtml where line #5 raised:
undefined method `nr_before_type_cast'' for