search for: activeview

Displaying 7 results from an estimated 7 matches for "activeview".

2008 Mar 14
3
ActionController <-> ActiveView code access ambiguity
Hi All! This is not a problem in general but i''ve just missed the point. If my application has a global state, which i have to use both throughout ActionController and ActiveView, then, where to place that state? E.g. if I do this: class ApplicationController < ActionController::Base protected def authenticated? !user.nil? end end then I can''t use that from any View. And, on the other hand, if I do write that as a public method - it acts as an action...
2006 Apr 07
0
How to combine rjs with ActiveView::Helper?
Suppose in controller: class ArticlesController < ApplicationController def search ... render :update do|page| page.replace_html ''panel_tab_searchresults'',:partial => ''article'', :object =>@articles end end And i want to add ajax styled Paginator to the view,i have got the method and i can work well directly used in view:
2007 Nov 01
0
Using view helpers from a controller
...rd dbms classes. What class would the new class inherit from? Mix in from? Why: I''m using the liquid template system to enable people to safely template their versions of my application. So I need to pass the various form tags of the screen to the liquid template. Thus I will not be using ActiveView rhtml etc to render. I could make a zillion calls (one for each element of the form) to render_to_string but that would not be efficient or workable. (A zillion partials.) Thank you for your helpful comments. Regards, Larry -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~----...
2007 Dec 26
2
Overriding or changing HTML generated by date_select?
Hi, I''m looking for a way to customize the HTML forms generated by date_select. I''m especially keen on replacing the year and possibly day input by a simple text field, since honestly, I find listboxes for years to be quite retarded (if I wanted client-side validation, there would be better ways to do that instead of having people try and find their year of birth in a list of
2006 Jan 27
3
Formatting Data in rhtml
Is there a simple way to format your data in the .rhtml file? I come from a PHP/Smarty background, and in the templates, I''ve used what is called "modifiers" to format data. {$price|currency_format} # displays in currency format {$description|truncate:"100"} # Truncates the description after 100 characters It seems like the template (rhtml) would be the ideal
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
...e a ViewController templating engine. ViewController is similar to Controller - is just one file, a class, which controls views of all actions. It uses yaml data files from which loads data. It is real push-style template engine. app/views/foo/foo_view_controller.vcrb class FooViewController < ActiveView::ViewController::Base def index return get( :body ) do |body| body.title = ''Homepage'' body.time = Time.now body.table do |table| @people.each do |person| table << get( :row, :name=>person.name, :surname=...
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
...ONLY the submitted values of the User ActiveRecord are filled into the form fields once again. But all the checkboxes are unchecked! I haven''t been able to figure out what exactly does happen in case a validation fails, although I have screened the source code of the ActiveRecord and ActiveView classes and come across the magic errors object. Here some source code: users_controller.rb: def edit @user = User.find(params[:id]) @visibility = @user.visibility end user.rb class User < ActiveRecord::Base validates_presence_of :lastname, :firstname has_one :visibility end edit....