similar to: Multiple Views within subfolders

Displaying 20 results from an estimated 10000 matches similar to: "Multiple Views within subfolders"

2008 Mar 17
6
REPOST: fallback layout mechanism
Sorry for reposting but as I got no reply so far so I am just coming to try my luck again. I am doing a multi-lingual website which might have several layout pages (language dependent)available. I want to do a mechanism to fall back from one language to another default language if such layout file is missing. Any chance I can do an is_exist check on the layout? With my current code I really want
2008 Mar 13
3
Refreshing a page gives a "stack level too deep" error.
I''m converting our app into restful rails. A couple of my classes (Resource and Asset) have a has_many relationship with each other - here''s the routes: map.resources :assets, :has_many=>[:resources] map.resources :resources, :has_many=>[:assets] I''m getting something weird in my view pages. When i go to /resources/4/assets it works. I go to the page
2008 Jun 02
5
validate - message in the flash[:error]
Hi, I want to show the validate - message in the flash[:error] - field but I can''t find any options. An example: class UserPermission < ActiveRecord::Base validates_presence_of :name, :message => "Please insert a name" ... | end V flash[:error] = "Error - " Has anybody a solution for this
2003 Oct 08
2
Samba 3.0 on RedHat 8.0
Hello, i'm sorry if this is a question which was asked before. We use samba 2.2 on a RedHat 8.0 box width Winbind to auth our Windows users. Now we want to install the RPM package provided on the samba website (for i386 RH8.0). My first question is, how can i see, with which options the package was compiled. We need ADS Integration, ACL and CUPS support. Can i see, if all features we need are
2006 Mar 16
2
Arrays of Model Objects, Intersections, Object Identification... ?
Hi all, Hope you can help me with understanding how Ruby / Rails treats arrays full of objects. Let''s say I have to arrays of objects. Both are the same kinds of objects. tomatoes = Fruit.find(:all, :conditions => [ ''tomato = ?'', true], :limit => 10) fruits = Fruit.find(:all, :limit => 10) And I want to create an array of these objects called @my_fruits,
2006 Apr 03
0
documentation question (ri and binding vs. get_binding vd getBinding)
I was reading up on ERB documentation and a snippet on rhtml requiring the use of Object.get_binding caught my attention: ... rhtml = ERB.new("someTemplate") rhtml.run(someObject.get_binding) ... Curious about tools I have at my disposal to learn more about things I don''t know about Ruby, i typed the following into my DOS console: ri get_binding and got the following
2008 Jul 01
8
redirect_to not working
Hi... I have a basic authentication system. I have a RESTful resource called session with the following code when logging in: def new end def create user = User.authenticate(params[:username], params[:password]) respond_to do |format| if user session[:user_id] = user.id flash[:notice] = "Welcome back #{user.name}!" format.html {redirect_to
2010 Apr 19
3
which views are rendered for an URL
Hi, Is there a way I can figure out which files are run for a specific URL? Given http://www.planet.com/countries files like: countries/ index.html.erb, countries/_country.html.erb, layouts/ application.html.erb and so on. Thank You -- M. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2003 May 14
1
Samba Log: change_trust_account_password
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi NG, i have samba-2.2.8a-1 on a RedHat 8.0 box. It's Domain Member of an NT4 Domain. I got no problems joining the Domain with "smbpasswd -j <DOMAIN> -r <PDC> -U <User> and i see it in the network neighborhood of any Win2k Client. But if i take a look into the logfile i
2008 Jan 18
18
Rails versus PHP in complex HTML/CSS
I have done a bunch of Rails stuff on my own and my company uses PHP. I often have to integrate very complex HTML/CSS into PHP. I know that the PHP looks more closer to the HTML than Rails because Rails has alot of link_to and other macro like calls that generate alot of stuff that you don''t see in the template. I am wondering if that could make it any tricker to generate the complex sort
2012 May 21
4
Rendering partial views with ajax calls in rails 3.1
I''m starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html #show.html format.js format.json { render :json => @host } end
2007 Dec 21
3
error installing gems
Hi all. While installing gems i am getting an error: ERROR: Error installing gem xml-simple-1.0.11.gem[.gem]: install directory thname:e:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.11> not absolute Ruby Version = 1.8.4 Rails Version = 1.2.5 Gems Version = 0.9.4 can anybody provide any pointers??? Thanks Arpit.
2011 May 20
5
views w locale default template
[RAILS3] I hesitate on how handling the locale view templates to default to one language only .. sending admin emails will go only to one locale ''en_GB'' should I set it up into the template name and set I18n.locale to ''en_GB'' membership_renew.en_GB.html.erb OR whatever locale is used , if I have : membership_renew.html it will be the default ? --
2008 May 26
11
doesn't create my guestbook
Hi, I''m having some trouble with my realtions (I think). I''m creating a guestbook with comments in ajax (the structure resembles the structure of a blog). So I''ve got a "flogs table" which keeps the "user_id" and the "id" of the flogs. This table. Then I''ve got a "guestbooks table" containing "id" of the
2008 May 08
5
Simple Generated Component Suddenly Gives Errors
What am I doing wrong here when I wrote a very simple component so : C:\ruby\letter4sure>ruby script\generate scaffold pso_printers printing_setting_id:integer pso_id:integer exists app/models/ exists app/controllers/ exists app/helpers/ create app/views/pso_printers ... Then I did a rake db:migrate And then I simply went to take a look at the url for the above :
2006 Feb 21
1
Custom forms and fieldWithErrors tags
Hi, (probably) A newbie questions: I have a form where a user can choose an email address, but there are only some choices for the domain, so I wrote a helper where the local part of the email is a text field and the domains is a dropdown list, like: Select Email: [ my_name ] @ <domain.com> ..which I defined as a helper: def email_form(tagname, domain_list)
2007 Jan 19
4
Rendering with erb
Hi, I thought it would be fun to try to write a render method that uses erb for rending. I''m not much of a programmer, but I still like to try: module Test require ''erb'' def render(m) ERB.new(IO.read("templates/layout.html")).result(binding) do ERB.new(IO.read("templates/#{m}.html")).result(binding) end end end This
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
2006 Jul 25
3
about ERB sample
Hi list: I run the ri''s ERB doc 1st sample 1. require ''erb'' 2. x = 42 3. template = ERB.new <<-EOF 4. The value of x is: 5. EOF 6. puts template.result(binding) the doc say it will print "The value of x is: 42" but my irb print "nil" and there is a "=> #<ERB:0x2970b24
2008 Jan 17
4
multiple views, and some routers
Hi, I''m new to Rails (just a Java Programmer tired of having to configure a lot of xml''s and mapping classes just to make a simple page (...)) anyway, I''m experiencing some problems with routers, i''ve created a new project using Rails 2.0 and created a scaffold for users. so i have the following: users/new.html.erb ... (and the other pages created by the