search for: viewhelp

Displaying 9 results from an estimated 9 matches for "viewhelp".

Did you mean: videohelp
2011 Oct 08
1
Rails view spec expectations/matchers
...nctionality, you should just use Capybara or some such... is that correct? If that is the case, can you please look at how I''m writing my view specs and let me know if there is a better/cleaner way? Here goes... *spec/spec_helper.rb* RSpec.configure do |config| config.include RSpec::ViewHelper, :type => :view end *spec/support/view_helper.rb* module RSpec::ViewHelper def page @page ||= Capybara::Node::Simple.new(rendered) end end *spec/views/comments/index.html.haml_spec.rb* require "spec_helper" describe "comments/index.html.haml" do it "shoul...
2010 Jul 23
0
alias_method_chain with i18n
...ello, I was investigating solutions for i18n with will_paginate and I found a possible solution at http://lawrencesong.net/2009/01/enable-i18n-in-will_paginate-plugin/ The author adds to application_helper.rb the following code: ############################################# include WillPaginate::ViewHelpers def will_paginate_with_i18n(collection, options = {}) will_paginate_without_i18n(collection, options.merge(:previous_label => I18n.t(''will_paginate.previous''), :next_label => I18n.t(''will_paginate.next''))) end alias_method_chain :will_paginate, :i18n...
2010 May 18
0
ruby-recaptcha seems be broken or has significant limitation
...stalled the gem 2. added config.gem ''ruby-recaptcha'' environment.rb: 4. modified action_controller.rb class ApplicationController < ActionController::Base include ReCaptcha::AppHelper 5. modified application_helper.rb like so: module ApplicationHelper include ReCaptcha::ViewHelper The inclusion of the Recaptcha::ViewHelper works. Meaning this tag: <%= get_captcha(:options => {:theme => ''clean''}) %> Renders an image. However, the controllers are another can of worms: calls like: if validate_recap(params, @user.errors) && @user...
2010 Jul 20
2
uninitialized constant WillPaginate::LinkRenderer
This is becoming painful. Where the file should be? What should be in it? I am running will_paginate 3.0.pre Here is my current code sitting in initializers/ class WillPaginateRenderer < WillPaginate::LinkRenderer def rel_value(page) "nofollow" end end Thanks for your help, -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed
2006 Mar 04
13
Using helpers from controllers ?
There is a solution to use helpers from controllers ? I have an error : |undefined method `content_tag''| class ApplicationController < ActionController::Base def test return content_tag("a","test") end end
2009 Mar 21
2
ApplicationHelper::WillPaginate (NameError)
What wrong? environment.rb require "will_paginate" application_helper.rb include WillPaginate::ViewHelpers def will_paginate_with_i18n(collection, options = {}) will_paginate_without_i18n(collection, options.merge(:previous_label => I18n.t(:previous), :next_label => I18n.t(:next))) end alias_method_chain :will_paginate, :i18n /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support...
2009 Aug 24
4
will_paginate: pagination links are wrong
I put everything in a pastie to make it a bit more readable: http://pastie.org/593379 This is the gist: Will_paginate doesn''t play quite nice. The first result set is fine, and when I click on one of the paginated links, it returns the following error: Couldn''t find DictatedExam with ID=filter_widget observe_field triggers filter_widget which calls the paginated search.. Which
2006 Feb 19
2
How far can you get without learning Ruby?
This has been my little experiment for the last few weeks. I jumped straight into rails after a few tutorials and have been using "Agile Web Development with Rails" as a reference. I picked up the Ruby syntax from examples which was not hard to do as I know various other languages. I''ve started 3 database driven web apps and all was going really well. Rails is fun and
2006 Feb 24
4
Any way to pass state to a component?
I am trying set up a rails app that utilizes components. I need to be able to pass some state (a bunch of name value pairs) from the Main controller to the component. Is there any way to pass this state info using render_component? Regards -- Posted via http://www.ruby-forum.com/.