Displaying 20 results from an estimated 1000 matches similar to: "MVC Overriding"
2006 Jun 08
3
MVC and Pagination
Just wondering how to best integrate with pagination and still stick to
MVC...
Say I have a Post model that has a published attribute. I want to show
all the recent published posts on a page.
My first instinct is to create a method in the Post model called recent
that does the find with proper conditions and order, but the problem I
have is how do I use that with pagination (which definitely
2006 Jun 21
0
rails MVC
Bonjour a tous,
voila j''ai quelque soucie a comprendre comment s''enchaine les appels de
la vue/controleur/model dans Rails :(
j''ai une classe qui me permet de faire la liaison entre ruby et c++ (ca
marche parfaitement) que j''ai mis ds le repertoire model (je ne l''ai pas
cree avec generate parce que je ne veux pas de BD! et j''avais
2007 Nov 05
0
Scruffy > MVC architecture?
Hi,
I am a newby in rails...and i have read that scruffy is a great tool to
create/display images.
Now i find the code below for example...
graph = Scruffy::Graph.new
graph.title = "Comparative Agent Performance"
graph.value_formatter = Scruffy::Formatters::Percentage.new(:precision
=> 0)
graph.add :stacked do |stacked|
stacked.add :bar, ''Jack'', [30, 60, 49, 29,
2006 Aug 11
3
General architechture / MVC question
Hi all,
A newbie with Ruby on Rails - and programming in general - I''m working
on a few Flash and PHP projects as well. Partly to make my work more
efficient, partly to gain a better understanding of system architecture
/ design patterns, I''ve been trying to use the MVC pattern in
database-backed Flash / Actionscript development as well.
I think / hope that I''m
2006 Aug 01
5
MVC question
Should I create a separate controller for each model or should I use 1
controller for all models?
Having 1 "admin" controller for all backend stuff seems logic to me, but
when I scaffold it rather makes 1 controller per model.
I''m fairly new to the MVC pattern, so what''s the prefered way of doing
it?
I''m also wondering if the API is up to date? When
2007 Oct 09
0
[Slightly OT] MS MVC taking slight hints from Merb
http://www.hanselman.com/blog/ScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx
In Scott Guthrie''s talk (about 43:30) he mentions requiring the render
call as a convention.
Interesting to see Merb influence Microsoft. :)
--
Cheers,
Kevin Williams
http://kevwil.com/
http://www.almostserio.us/
http://kevwil.jaiku.com/
2006 May 08
3
MVC newbie question
All,
Is it possible for a view to call back to a controller method? If so,
what is the syntax?
=== details
I have a list view that I want to filter out inactive rows based on
several table fields being zero, old, etc.
It would seem I should create a "filtered" method in the controller
(which I have done).
Then invoke if from the view like:
for row in @rows
continue if row.filtered
2006 May 22
1
MVC and cron jobs
I have a cronjob that runs "ruby script/runner ''Channel.preload''".
Channel is a parent model, Item is the child model (i.e., Channel
has_many :items and Item belongs_to :channel). The coupling is
minimized, the coherence looks good, but I''m not sure the model is the
right place to put this code. Is there a better place to put this
code, e.g., a component (I
2006 Mar 02
7
The no-framework PHP MVC framework
"The no-framework PHP MVC framework"
http://toys.lerdorf.com/index.php?url=archives/38-The-no-framework-PHP-MVC-framework.html
Yuck! What spaghetti code. I can''t ever imagine preferring that to
Rails.
Joe
--
Posted via http://www.ruby-forum.com/.
2008 Feb 09
0
MVC interplay to query multiple models
I''m trying to track down why I''m getting close to desired output, but not
quite. It looks like the webpage sorta-kinda is grabbing the right
data. For instance, there are three Login objects which should be
showing and it looks like the show is grabbing three objects, so that
fits, to a degree. However, it''s just grabbing the hexadecimal object
id, and not
2006 Apr 23
8
Shattered, the rails-based MVC game development framework
if( you_want_to_make_a_game_with_ruby ) {
http://shattered.hastilymade.com/shattered_ruby.png
http://shattered.hastilymade.com/shattered_ruby.png
http://shattered.hastilymade.com/shattered_ruby.png
Shattered 0.3 has just been released! Inspired by Ruby on Rails, Shattered
is doing for game development what rails has done for web development.
Get it here !
We''ve made this
2006 Feb 06
4
Basic MVC in RoR question
Ok, Here''s my controller:
def create
trainingplan = Trainingplan.createplan(@params[:startdate],
@params[:enddate], @params[:hoursperweek], @params[:programtype])
end
My model is:
class Trainingplan <ActiveRecord::Base
def self.createplan(stardate, enddate, hoursperweek, programtype)
stardate = startdate
enddate = enddate
hoursperweek = hoursperweek
programtype
2006 Jun 22
2
MVC architecture
Hi,
I want to creat a GUI accessible via the web with ruby to interface some
matlab implementation ... so I extended Ruby with C++ and then matlab :)
that works perfectly: I have finaly a Ruby class I can call whenever I
want to lunch my matlab algorithm ;)
the point is now I have to make the GUI in HTML with Rubby on rails and
Damn! I don''t get how works the MVC architecture in Ruby
2007 Apr 20
2
MVC Philosophy
My directory browsing app shows lists of file. If the item is a folder,
show a folder icon and link to the action that shows directory contents.
If the item is a graphics file, show a thumbnail and link to a larger
view. If the item is a non-graphics file, show an appropriate icon and
stream the file if the link is clicked.
The controller creates an array of arrays of items in the current
folder,
2006 Aug 18
3
Understanding MVC - view customization after using scaffolds
All,
I have ordered AWDWR and am anxiously awaiting its arrival. In the
meantime I still am playing with ROR using radrails. I have a few
questions ...
I create a table named customers with the following details:
Field Type Null Key Default Extra
id int(11) NO PRI auto_increment
customer_name varchar(50) NO
inbound_retention int(11) NO
outbound_retention int(11) NO
unix_admin_email
2006 Jul 31
5
can someone explain RoR MVC from a C++ or Java perspective?
is a model similiar to a class? and active record is similiar to how
Java classes inherit from Object?
View is nothing more than an output of a model with HTML?
Controller is basically the Main part of the program?
--
Posted via http://www.ruby-forum.com/.
2012 Feb 02
3
MVC questions with rails
2006 Mar 26
7
MVC Design
Hello I have been using LAMP for the last 6 years and i am now finally
making the choice to move over to RoR. This MVC stuff is all very new to
me. As i have no trouble understanding ruby code... or any code for that
matter.. my challange comes in getting my head around the MVC stuff. Is
there any demos articles that you guys have seen that takes a site or a
business breif and explains where
2006 Oct 20
7
MVC and modules. Views telling models to behave
I was thinking today, it would be nice if a view could tell a model how to
format it''s data for that particular view.
Kind of like, the view is bestowing instant, and temporary knowledge on the
model for the duration of the views run.
It seemed to me that this would be more objecty than say a helper that
formats a string
format_my_string( my_string )
Instead, in my view. Lets assume I
2005 Dec 20
12
How to model "Expense Report" in Rails MVC
1st: I am a newbie to Rails & to pure OO.
Q: I want to use rails for creating a "master-detail" form. page layout
will allow users to type in an "expense report header" and as many
"expense report lines" as they need to. I understand how to wrap the
final submit action using "transaction" to ensure the inserts to the
database happen within the same