Displaying 20 results from an estimated 100000 matches similar to: "accessing controllers in script/console"
2006 Apr 23
5
Controllers in folders and helper scope in Rails >1.0
Hi,
Here''s my problem. I tried to google it, read the release-docs and
haven''t found anything similar.
My application uses folders to store controllers, as described in the
Rails book. I need to have same-named controllers for admin and for
users, so it looks like this:
/app/controllers/admin/project_controller.rb
/app/controllers/admin/...
2005 Dec 03
1
shared methods for controllers belonging to a specific module
Hi everyone.
I was just wondering what the best way ™ might be to let all controllers
of a module share methods and variables. Is there some "magic" file
rails will automatically load when a module is requested or do I have to
manually (doesn''t sound like the rails way..) create a class with the
desired methods/variables and let my controllers inherit from it? If so,
where
2006 Nov 28
2
R() in controllers
Hello all,
I have an app mounted under /test via lighttpd fastcgi as indicated on
[1]. Here I use R(Foo, bar) in views to link to controller foo, this correctly
creates a /test/foo/bar link. However, when I use R() in some controller,
for example:
headers[''Refresh''] = "60; url=#{R(Foo, bar)}"
The generated link is /foo/bar, which obviously links to something
2010 Aug 19
3
Help: "500 Internal Server Error"
Hi guys,
I am a completely ruby & rails newbie. i have being struggling on this
issue for almost 2 days, still can not figure out the problem.
there are two websites i''m trying to set up a development environment on
my pc running windows xp 32 bit version. a front-end customer facing
page & back-end admin page.
the procedure i have gone through is:
1. install ruby version 1.8.6
2006 Feb 06
1
Two subdomains with diferent controllers but same helpers and components
Hi,
I want to have www.myproduct.com and myclient1.myproduct.com working on same
server.
I would like to have different controller in wich subdomains, example:
on www I want to have sgnup and prices controller and on myclient subdomain I
want login, settings, etc...
I can open two environments
rails www
rails clients
or point the two subdomains to same environment
rails myproduct
Wich is
2006 Jun 22
2
rails on Oracle 10g - missing controller ?
I am trying to generate my first scaffold but I am getting a 500 error
from http://127.0.0.1:3000/foo . Below is the information about my
system, as well as the commands I am typing. I have also included the DDL
( Oracle 10g ). I am mid way through chapter 6 of "Agile Web Development
w/ Rails". Why aren''t there any files under app/controllers/ ?
C:\tmp\rubyWork>ruby
2017 Jun 12
2
CentOS7: How to debug SEGV when asterisk starts with autoload=yes ?
Hello,
I was tasked to install Asterisk 13.16.0. from source on a CentOS7 platform.
For that purpose, I used an unmaintened script of mine, written 10 monthes
ago, and I was surprised to get segmentation violations whenever I ran
"asterisk -cvvvvvvv -U asterisk".
Usually, my /etc/asterisk/modules.conf file includes "autoload=yes" setting.
Basically, I see two alternative
2015 Jul 13
0
Strange issue with share access on domain controllers
Make sure you use the new GPO policies.
Looks like the problem "[Samba] Windows 10 in Samba 3 domain: netlogon share access denied"
Its not only for windows 10, also 7 and 8.x
Solution: GPEDIT.MSC -> Computer -> Administrative templates -> Network
-> Networkprovider -> Hardened UNC Paths
Added
\\foo.lan\netlogon and Value:
2006 Aug 16
4
Accessing Constants Declared in Helper Modules
Hello all,
I''m having great trouble accessing a constant declared in a helper for
one of my view templates. I am trying to create a grouped selection list
based on a predefined set of values. Rather than declare this set of
values in the view, I wanted to put it in the helper that automatically
gets included for the view. Unfortunately, it doesn''t seem to work.
All methods
2003 Jul 22
1
Making a group membership matrix
Hi Helpers:
I have a factor object that has 314k entries of 39 land cover types.
(This object can be coerced to characters neatly should that be easier
to work with.)
> length(foo)
[1] 314482
> foo[1:10]
[1] Montane Chaparral Barren Red Fir Red Fir
[5] Red Fir Red Fir Red Fir Red Fir
[9] Red Fir Red Fir
39 Levels:
2006 Aug 01
2
restful controllers - howto nest with link_to?
Hi List,
I''m trying to get my grip on the restful methods that are now part of edge
rails.
Making the first steps was impressive as well as easy because there are
already great resources on the blogs of early adopters:
http://www.ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-itand
2011 Oct 26
3
Overriding number_to_human (Rails 3.0.5)
I encountered a problem today, in that the number_to_human helper has a
defect where it spits out an error when passed any number bigger than 0 and
less than 1.
eg number_to_human(0.2) gives "nil can''t be coerced into fixnum"
So, I found this patch:
https://github.com/rails/rails/commit/7c8a5f5759a0c63945d133280fb78deaa86b65b9
Now to apply it, I had to create a file:
2008 Feb 03
4
Testing helper/view methods from script/console
Hi,
Is it possible to test helper/view methods from script/console. I want
to test the output of methods like distance_of_time_in_words. But it
won''t let me from the console. What am I missing?
TIA
Luke
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2005 Nov 06
1
mixins not reloaded as expected?!
Hi guys,
in development mode a module mixed into a helper class seems not to be
reloaded
inside app/helpers:
class TestHelper
include EvenMoreHelp
#foo
end
module EvenMoreHelp
# bar
end
the contents of #foo get refreshed, but not #bar...
is there a way to fix that behaviour.
I intend a full reload in development mode for obvious reasons.
Regards
Peter
2007 May 17
2
Stubbing authentication across multiple controllers
Hi,
I''m new to RSpec, so I''m not too sure of the best practises in stubbing. I was thinking along the lines of including a helper method that would stub out a users id and posts to sessions/create. It works fine when speccing SessionsController, but of course it fails when it is included into other controllers specs, because of the post. I''ve tried posting to an
2005 Dec 20
0
Separating models, controllers, etc. into subdirectories
I''d like to organize my models, controllers, helpers, and even toplevel
view directories into subdirectories. There are so many files in my
rails app that it is getting unwieldy to find files in a list. Is there
a correct way to do this so that things don''t break? I tried putting
the model files in subdirectories; some pages seemed to work (models
loaded fine), while
2019 Apr 30
0
[PATCH v3 01/19] drm: Add |struct drm_gem_vram_object| and helpers
Hi,
thanks for the feedback.
Am 29.04.19 um 21:58 schrieb Sam Ravnborg:
> Hi Thomas.
>
> Some minor things and some bikeshedding too.
>
> One general^Wbikeshedding thing - unint32_t is used in many places.
> And then s64 in one place.
> Seems like two concepts are mixed.
> Maybe be consistent and use u32, s32 everywhere?
The DRM API already has a mixture of such types
2006 Jul 29
0
Accessing vars within helpers in Markaby
I''ve been trying to figure out how to do this:
select_tag ''site_id'',
@helpers.options_from_collection_for_select(Site.find(:all,
:order=>''name''), ''id'', ''name'', @site_id)
The select_tag gets output fine, but the default value
isn''t set. @site_id is set in the controller (@site_id
= cookies[:site_id]). In
2006 Aug 04
0
How do you use form helpers in your controllers or classes?
I need to use the number_with_precision Form helper in my controllers
and classes.
How do i do this?
Thanks in advance
Chris
--
Posted via http://www.ruby-forum.com/.
2006 Aug 15
2
Apache & FCGI: Premature end of script headers:
Hi,
I have quite a problem right now. After finish of development I
installed rails with fcgi and apache on my production env. Everything
seems to be configured ok, but once I while I get the famous error
message:
" Premature end of script headers: dispatch.fcgi"
I cant see any generel configuration problem, as sometimes everything is
running fine.
Maybe it is a problem related to