search for: pages_control

Displaying 20 results from an estimated 24 matches for "pages_control".

Did you mean: page_controls
2012 Jul 18
3
Undefined method error
I have been working on a project based on Michael Hartl''s book Ruby on Rails Tutorial in order to try to teach myself Ruby on Rails. However, when it tries to render a form designed to allow a user to submit a small message, I get an error saying, "undefined method `model_name'' for NilClass:Class". It says the error is at line 1, which is "<%= form_for
2006 Aug 19
4
acts_as_ferret causing strange behaviour
...tant. In addition the error message also tells me the problem occured when attempting to load file e.g. /admin/page.rb All my models are stored in the /models/ directory, however the controller calling the model is inherited from a controller called AdminAreaController within /controllers/admin/pages_controller.rb So, why when I add acts_as_ferret does rails try to look for my model in /model/admin if the controller is in /controllers/admin, but if i use the console then everything is fine? Any ideas, I''m a bit stumped... -- Posted via http://www.ruby-forum.com/.
2009 Apr 12
0
rails 2.3 nested forms with has_many through checkboxes
...ch'' /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2741:in `attributes='' /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2627:in `update_attributes'' /Users/rajo/Sites/boilerplate/app/controllers/admin/ pages_controller.rb:107:in `update'' /Users/rajo/Sites/boilerplate/app/controllers/admin/ pages_controller.rb:106:in `update'' Request Parameters: {"commit"=>"Save", "_method"=>"put", "authenticity_token"=>"DvvJPsU9c942x1Ak5wOIm8...
2011 Jun 09
1
subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist
Hello, I''m doing namespace routing based on subdomain, rather than path, so that http://admin.example.com/pages leads to app/controllers/admin/ pages_controller.rb. Cucumber is following this fine, but RSpec is complaining that the requested route doesn''t exist even though "rake routes" shows the route. When I add a standard namespace below the "scope :admin" block in my routes.rb file, RSpec does recognize the route, but I...
2007 Jan 13
5
Problems using acts_as_ferret
Hi all, I''m trying to use acts_as_ferret and have run into a brick wall. My model is Page My controller is Pages_controller. When in console, I can search for contents, and find results. For example, when I search for "spam" it "finds" 7 results. => #<FerretMixin::Acts::ARFerret::SearchResults:0x2693934 @total_hits=7, @results=[]> you can do a "p.total_hits" and get 7.....
2011 Apr 15
7
warning: toplevel constant XYZ referenced Admin:XYZ
I have an odd problem. I got controllers in a namespace and controllers outside of the namespace. For example, I have a PagesController and a Admin::PagesController. When I run rspec from the top, tests pass and I get the following warning: spec/controllers/admin/pages_controller_spec.rb:4: warning: toplevel constant PagesController referenced by Admin::PagesController This makes no sense. I do have a PagesController and an Admin::PagesController and specs for both that are declared properly. I get this for 3 out of about 20 controllers. Any ideas?
2011 Nov 25
4
Sprockets File not Found Exception.
...: <%= csrf_meta_tags %> 8: </head> 9: <body> Rails.root: c:/railscode/test_app ------------------------------------------------------------------------ I created some controllers using the command: $ rails generate controller Pages home contact create app/controllers/pages_controller.rb route get "pages/contact" route get "pages/home" invoke erb create app/views/pages create app/views/pages/home.html.erb create app/views/pages/contact.html.erb invoke rspec create spec/controllers/pages_controller_s...
2010 Nov 12
1
Dashboard throwing undefined method `to_time' for nil:NilClass error on page view
...p/models/status.rb:7:in `initialize'' app/models/status.rb:76:in `new'' app/models/status.rb:76:in `execute'' app/models/status.rb:76:in `map'' app/models/status.rb:76:in `execute'' app/models/status.rb:66:in `by_interval'' app/controllers/pages_controller.rb:3:in `home'' haml (3.0.13) [v] rails/./lib/sass/plugin/rack.rb:41:in `call'' /opt/puppet/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /opt/puppet/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /opt/puppet/lib/ruby/1.8/webrick/server.rb:173:in `...
2009 Oct 28
6
undefined method `^' for "e":String
...roller/request_forgery_protection.rb:102:in `form_authenticity_token'' (eval):2:in `form_authenticity_token'' /Users/username/Sites/Ruby/sample2/app/views/pages/new.html.erb:3:in `_run_erb_app47views47pages47new46html46erb'' /Users/username/Sites/Ruby/sample2/app/controllers/pages_controller.rb:29:in `new'' I read another post on here that reported an error similar to this and it lead to this patch: https://rails.lighthouseapp.com/projects/8994/tickets/3144/ However, this patch is apparently specifying message_verifier.rb, which I do not see in my error, and I do not know...
2006 Jul 26
1
Scaffolding Problems
...`constantize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/pagination.rb:194:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/pagination.rb:129:in `paginate'' #{RAILS_ROOT}/app/controllers/pages_controller.rb:31:in `list'' -e:4:in `load'' -e:4 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' c:/...
2008 Jan 10
2
Error on manual indexing
I''m having some problems with getting the drb server to work correctly on my production server. As a workaround I tried disabling automatic indexing and have a cron job manually update the index every hour or so. I disabled the automatic indexing with: def ferret_enabled? false end But whenever I try Page.rebuild_index I get a ''wrong number of arguments''
2008 Jun 20
4
Handling content pages (CMS-like)
Hello list, I wonder how you guys handle content pages? Often described as "static" pages. However, I don''t like to call them "static" because these pages often do use some minor dynamic content. This is what I like to think of as the "website" part of the web application. Content that does not have complex logic behind it. I had to handle it in the
2012 Nov 26
5
Missing template pages/layout only occasionally
...:in `find_template'' ... /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.9.rc5/lib/action_controller/metal/instrumentation.rb:39:in `render_without_wicked_pdf'' /var/www/procyon-live/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:19:in `render'' /var/www/procyon-live/app/controllers/pages_controller.rb:154:in `show'' ... Rails 3.0.9.rc5 Ruby 1.8.7 Obviously I didn''t want to include the entire backtrace. Let me know if it would help. Thanks, Rick -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups &qu...
2009 Dec 02
14
root_path and root_url undefined
Hi all, I''ve just started working on another RoR project after a couple of months away. I''m having trouble with named routes, specifically root_* In previous apps I''ve used root_path and root_url without any problems, but in this project (2.3.2 - the same as my last project where I used it) it comes up undefined. I''ve double and triple checking my routes.rb,
2006 Aug 18
0
Impact of inheriting controllers on models
.... If I try a CRUD operation from the console it works fine, and the filters that acts_as_ferret trigger to update the index fire correctly. So, is this issue due to the fact that I have this much inheritance in my application, or because I have controllers named similarly to my models (page.rb pages_controller.rb) or something I have totally missed... -- Posted via http://www.ruby-forum.com/.
2008 Jan 23
0
bug in external apps
...controller.rb:110:in `redirect_to'' vendor/rails/actionpack/lib/action_controller/base.rb:987:in `redirect_to'' vendor/plugins/facebooker/lib/facebooker/rails/controller.rb:110:in `redirect_to'' ### ... above two lines repeated 100''s of times ... ### app/controllers/pages_controller.rb:11:in `method_missing'' Request Parameters: None Show session dump --- flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}
2010 Jul 25
0
You can't set a constant with namespace in the initializers?
Help! in my rails controllers, there is a ''Admin'' namespace. (My the structure of the controllers dir is like this : app/controllers: home_controller.rb ... admin/posts_controller.rb admin/pages_controller.rb The ''Admin'' will automatically become a Module constant (I know it from the console: ''puts Admin => Module''); And in my initializers, ther is a init.rb which has codes like this: Object.const_set(''A'', ''a'') Object::A...
2006 Feb 14
2
CMS-like routing
I''d like to set up routes like /<section>/<article>. Using a route like map.connect '':section/:article'' works just fine, but I''ve also got an admin area that is accessed through the route ''admin''. Inside the admin area I''ve got subpages like admin/sections and admin/articles. This is conflicting with the other routes
2005 Dec 06
5
How to set a default value?
Hello, I have a price field that I validate of numbers. How can I default a 0.0 value? Regards, Frank Rocco farocco-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
2010 Nov 06
2
Rails show views from a different controller
In my Ruby on Rails application I have a page Aboutus - This has a Controller and View. Has no model. I have a Comments model (generated by the rails generate scaffold comment) - This has a Controller, view, model On my Aboutus page, I want to show the "Comments" from the comments model, so I am thinking of using the Comments index action (to list comments) and new action (to create