search for: rthml

Displaying 20 results from an estimated 22 matches for "rthml".

Did you mean: rhtml
2006 Feb 02
4
How switching global layout (application.rthml <or> custom.rhtml)
Dears, My railsapp run using ''/layout/application.rhtml'' and under some conditions ( Authenticated user, url parameter) I like to switch globally to another layout, let''s say custom.rhtml Like : class AppController < ApplicationController before_filter :context_layout def index end end # application.rb def context_layout if <context_condition>
2006 Mar 17
4
using ajax and layouts
...use ajax to create a search field including <head><%= javascript_include_tag "prototype" %></head> does''nt work when I include the line in my app/views/layout/demo.rhtml. Name of controller is demo_controller.rb. The search-field is in app/views/demo/observer.rthml and I have to include the above mentioned line in this file to "ajax-enable" the search-field. Should''nt it be possible to include it from a layout-file? regards Claus
2005 Dec 01
2
View helpers and nested attributes
Hello all, I have a model with two entities (document and asset) and a 1:1 relationship defined between them (every model has an asset). I want to generate a rthml view that generates a hash for document attributes and a nested hash for asset attributes (for example {:document =>{:name=>XXX :asset => {date =>XXX}}) According to the Pragmatic Programmers book (page 355), the input fields for this should be something like <input type="tex...
2006 Jan 04
3
Legacy Table works-except edit?
Greetings, I''m trying to put a Rails face on a Legacy Oracle 10 table. I am currently setting the table_name and primary_key, and I get the list and show to work fine. However, when I hit edit I just get the Editing <table name>, Edit button, Show, and Back. None of the fields are rendered. Why would I be able to show these fields in the show and list, but not edit them in the
2014 Apr 15
2
Fwd: ¿Cómo generar informes con R sin utilizar LaTeX?
...Me parece que podrías investigar si Scribus puede generar e insertar la salida de R en sus documentos, por lo que estás agregando a tu pregunta me parece que BI no es el camino. Si lo haces, creo que a más de uno en esta lista le interesará la experiencia. La alternativa sugerida por Emilio usando Rthml y CSS con probablemente markdown y, yo agregaría, pandoc me resulta muy interesante y prometedora, he realizado algunas cosas con Rthml y CSS y es mucho lo que se puede lograr (no completé, no lo necesitaba, el camino hasta pdf), pero claro depende de tu experiencia sobre html. Daniel Merino El...
2006 Aug 08
3
Rendering partials based on conditions
Hi, A bit unsure how this gets accomplished - particularly how it might get set up in the layout. Currently - This is my welcome.rthml (what comes up at main page) <% if @u %> <%= render :partial => "main/session" %> <% else %> <%= render :partial => "main/login" %> <%= render :partial => "main/register" %> <% end %> But in my layout currently to mak...
2006 Apr 28
1
acts_as_taggable help
...@tag_name = params[:tag_name] @tagged_items = Item.tags_count(:limit => 100) end IN the VIEW <% @items.each do |item| %> <%= render :partial => ''list_stripes'', :locals => { :item => item } %> <% end %> Where the partial _list_stripes.rthml is a list of items <td><%=h item.tag_names.join(" ") %></td> <td><%=h item.created_on %></td> <td><%=h item.category.name %></td> But i get an error "undefined method `tag_names'' for #<Array:0x3673b08&gt...
2006 Mar 30
2
A few problems after installation
...ether with cPanel. On port 3000 there is the Rails welcome page. Could you tell me how I can change the home page directory? Currently, the home page directory is /home/username/public_html, but I''d like to use RoR''s home directory instead. I also have another problem: I put .rthml files and instead of the web server parsing it, it returns plain text files. Do you have any idea? Thanks, -- Posted via http://www.ruby-forum.com/.
2006 Aug 03
3
Help me for learning Rails for my project!!!
Hi, I am Anil I am currently working on a Rails project in my company. I am facing some problems listed below! 1. I have websites UI ready(HTML/CSS), I want it to convert it to rhtml. Is their any script or software which will help me to convert html syntax to rhtml, instead of manually changing it to rhtml ? 2. Which editor should be used for rails development. I have started using RadRails
2006 Apr 17
2
Refreshing RHTML page with previously posted data?
...ta that was previously entered when my controller action notices a validation failure and calls render on the view that does the submit. Example: View x.rhtml - text field is filled in Call controller action Controller action fails validation calls render (:action => ''x'') x.rthml shows up with blank text field which I would like to be filled in. Why this doesn''t work makes sense to me (more or less) already. My text_field is not associated with an attribute on a model object. The object and field names are arbitrary since I was able to successfully pull the da...
2006 Jul 27
1
Passing a parameter in a method via URL
Hi there, I want to pass a parameter with a method invoked from an .rthml file. How can I do that? The method is called list_by(category) and is located in an ordinary .rhtml page. The category parameter changes depending on the context. But it can never be invoked because URLs can''t display brackets. Do you get what I mean? Can anybody help? -- Posted vi...
2006 Jun 28
1
HELP! adding new object to @objects...
...'m in deep shit for my exam tomorrow! :) as you can see, I want to search with Tesi.search with all params arriving from form ''se'' so I need to add the @tmp result to @tesis collection if not empty.. If I use an array for @tesis I can push @tmp but then I got errors in .rthml If I use @tesis = Tesi.new I can''t push (I don''t know how to..) but if I try to iterate @tmp in .rhtml it works... PLEASEEEE HELLPPP! :P my controller: def dosearch @search = "" @tesis = Tesi.new if (@params["se"]["free"].to_s.length &gt...
2006 Apr 23
0
Using Paginator outside of controllers
I am doing this in _messages.rthml: <% shout_pages = Paginator.new self, Shout.length, 30, @params[''page''] %> <% shouts = Shout.find :all, :order => "timestamp desc", :limit => @story_pages.items_per_page,...
2006 Jan 09
1
Modifying script generated scaffold output Books/Authors
People, For my little book library db I find the rails script generated stuff fine for most of my needs but there is one thing I couldn''t figure out . . Part of the auto output of app/view/books/edit.rhtml is: <%= start_form_tag :action => ''update'', :id => @book %> <%= render :partial => ''form'' %> <%= submit_tag
2006 Aug 17
3
What''s the best way to stop repeating this line in my controller?
Hi, I am trying to follow the "DRY" principle and came across a problem. I am working on a small ajax task manager, and right now in the index page which renders the list, I have (for example, in the Lists controller): def index @lists = List.find(:all) end Now within the controller there''s also a list_add action which is called via ajax.. def list_add if
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if the user has no access right) this is my code, it work the first time I run the application, the second time I refresh the page I always get "stack level too deep error" module UsersHelper include ActionView::Helpers::UrlHelper alias_method :link_to_original, :link_to def permission? true
2006 Dec 11
5
using form_tag with a get request with params
I''m trying to create a search field using the form_tag helper. The problem is when I enter a search, the url_for returns an address such as host.com/search?term=foo. I want to use the format host.com/search/term. I have it set up in routes to recognize the format search/:term, but form_tag always uses the format host.com/search?term=foo. Does anybody know how to do this? Cheers! Ray
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi, Its taking me a long time to get my head around the Liquid plugin. I have a couple of questions which hopefully someone can help me with... - How difficult would it be to add some kind of Filter or Tag which would allow other Liquid templates to be included into the current Liquid template (eg. similar to render(:file => "filename") - How difficult would it be to add
2014 Apr 14
7
¿Cómo generar informes con R sin utilizar LaTeX?
Hola a tod@s, quiero generar informes con los resultados de R en formato pdf preferiblemente. Actualmente estoy utilizando knitr junto con LaTeX. Y ya conozco el resto de formatos de salida de knitr como: markdown, html, ... ¿Alguien conoce otras alternativas? He visto algo de jasper report por ahí, pero desconozco cómo poder comunicarlo con R. Muchas gracias por adelantado. -- Víctor Nalda
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of my class "entity". Entity is ActiveRecord. I''m able to retrieve all sorts of data from an @entity, until I do something like: <% for @attribute in @entity.attributes %> <div id="attribute_<%= @attribute.id %>"> <%= render(:partial =>