Displaying 20 results from an estimated 20000 matches similar to: "How to print data with out rendring page?"
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all,
How can i use form_remote_tag inside the form_tag helper .
My application has following view subscribe.html.haml
- form_tag :action => :subscribe do
/other form element
%input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"}
%input{:type=>''radio'',
2010 Sep 07
2
Help on formatting some HAML
I wondered if anyone could help me with turning the following in ERB
into HAML. I''m VERY new with HAML:
----
<div class="block-element span-7 colborder">
<span class="rightside blue-hue no_decor"><%= link_to "New Order",
new_order_path, :remote => true %></span>
<h3>Today''s Activity</h3>
<hr>
2013 Mar 07
2
Puppet Dashboard changed reports view error
Hello Puppet Users !
We encounter a problem with the dashboard on this URI : /reports/changed
The /reports works fine with ~130000 reports (up to 3 months and
auto-cleaning with rake reports:prune job)
I make a reports:prune:orphaned, juste in case, but without any success.
The most recent change on the server was the puppetmaster upgrade from
3.0.2 to 3.1.0.
Here is the dashboard error log
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:
2010 Nov 22
0
Something wrong after upgraded to puppet-dashboard 1.04
After upgraded to puppet-dashboard 1.04, when I click links to check
information of nodes or groups , such as http://localhost:3001/nodes/22,
it return a "We''re sorry, but something went wrong." to me. Checking
the log, i got something as follows:
ActionView::TemplateError (undefined method `<=>'' for #<NodeGroup id:
5, name:"Web_Marketing">) on
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone,
I am relatively new to rspec and I am running into a wall in testing my
views. I have a RESTful resource Contracts with a nested resource of
Line_items.
I am trying to figure out how to test the "edit" form of the Line_items.
What complicates this is the nested routing and how to account for it,
and that there is a partial form (_form.haml) that both the edit.haml
and
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
2010 Aug 09
0
Devise :current_password validations and checking (how???)
Hi Guys,
In my devise applications in Rails 3, I created a separate form under my
SettingsController class of which it handles the ''Change Password'' of
the User Model, so i can manipulate the current_user in the
SettingsController.
Now, I followed the set-up in the Devise/Views on how to update the form
using ''Change password'' and either way update User for
2011 Nov 01
0
SOLVED: World of Warcraft d3d crash and rendring problems
Hi wine people,
with some help from the Nvidia forum I managed to solve a problem with World of Warcraft 4.x.x that I suspect is directX / Wine related:
Enabling -d3d9 and -d3d11 would cause the below mentioned problem with Wine 1.2.2, while it would crash World of Warcraft program under Wine 1.3.15 (Ubuntu 11.04 debs), while OpenGL runs perfectly (30-60 fps with all opengl settings on ultra):
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2.
Running rspec on it brings about a large amount of these messages:
DEPRECATION WARNING: Passing a template handler in the template name is
deprecated. You can simply remove the handler name or pass render :handlers
=> [:haml] instead. (called from block (2 levels) in <top (required)> at
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and
''acts_as_taggable_on_steroids'' and all of them output "undefined
method ''empty?''" with the tag_cloud action.
I am following the guides precisely. Yet I can find no references to
this error anywhere, so I must be doing something wrong...
I am on
2012 Oct 10
8
link_to with additional data
Hi,
rails 3.2.8
I must be missing something basic (and it''s been driving me mad) because I
am trying to send one additional data attribute to my controller from a
link, but I can''t seem to get it into the params received by the controller.
I have looked around and found answers, but none seem to affect my links.
I''ve set up a dummy app with a home page and a single
2006 Mar 05
0
Pagination Question [Tagging: find_tagged_with]
Hello experts,
I am trying to paginate the following query but no matter what I try I am unable to paginate it.
In controller I have:
q_webpages=Webpage.find_tagged_with(:any => params[:tag], :separator=>'','', :order=>''updated_at DESC'')
@webpage_pages, @webpages = paginate_collection(:collection=>q_webpages)
2011 Jan 02
7
Rails, .swf, .flv
I have the following HAML code
ul{ ''id'' => tutorials_ul }
%li
%a{''href'' => ''/videos/create-command-001.swf''}
''Edition swf''
%li
%a{''href'' => ''/videos/create-command-001.flv''}
''Edition flv''
When the user clicks on
2011 Jun 08
4
Cannot modify SafeBuffer in place
Upgraded from rails 3.0.7.rc1 to 3.0.8 today and ran into a problem when
rendering haml:
TypeError in Pages#home
Cannot modify SafeBuffer in place
Full Trace:
activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!''
haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes''
haml (3.1.1) lib/haml/compiler.rb:358:in `each''
haml
2010 Jul 07
4
Haml ... ending a line with a | (vertical bar)
I don''t know if HAML questions are appropriate here ... but here goes.
How does on end line to be rendered with a vertical bar (|) ?
The vertical bar is a line continuation, aparently.
Doing \| cause the vertical bar to be emitted ... as well as the
backslash.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
2009 Feb 13
4
How to get first 10 items from hash in ruby?
Hello All, I am new to programming, i have little problem with hash.
I want to retrieve first 10 items(key value pairs) from given hash{}
hashTable = {"a" => 1, "b" => 5, "c" => 2, "d" => 6, "e" => 4, "f" => 7,
"g" => 9, "h" => 5, "i" => 1, "j" => 8, "k"
2006 May 16
1
Passing text from an rhtml input to a controller
Hello,
I would like to allow people to type some text into a webpage and
then have that text passed to the controller (e.g. for use by a search
routine). The following code has an input box in a form. What would I
put in the "title" parameter to have that passed to the controller?
When I put in a constant string it works but when I put in things like
2011 Sep 04
4
same html elements rendering twice on page
hey all,
My index.html.haml:
- wrap do
- page_title "Teams List View"
application_helper.rb:
def page_title(title)
content_tag :h1, title
end
def wrap(&block)
concat(content_tag(:div, capture(&block), :class =>
"generic_header"))
end
I load in browser and get:
<div class="generic_header"><h1>Teams List
2009 Aug 27
0
HAML/SASS Auto Updater for $2
The recession has hit my family hard, so I''ve decided to sell an
application that I use quite often when designing websites.
Screenshot: http://img195.imageshack.us/img195/5440/screenshotisl.png
With this application, you may add haml/sass files and when they are
changed, they automatically transform into html/css. This is great for
making templates or creating webpages outside of