AS Creative Design wrote:
> Hi everyone,
>
> Just thought I'd introduce myself to some fellow Rails users.
>
> I'm a Web Designer based in Glasgow, Scotland and have over 6 years
> industry experience as a Senior Designer, having previously worked for
> a graphic design agency before becoming fre
Frank Kim wrote:
> I have a model, let's call it Player.
>
> It has many Trophies.
>
> How do I do a simple query in Rails in my controller that will return
> let's say all Players that have more than 5 tropies?
>
> Sorry for the dumb question but I can't figure it out. :-)
>
> --
> Frank Kim
>
Sharagoz -- wrote:
>>I'm a little confused
> Checking what type of user is logged in is as simple as
> current_user.class.
> Rails doesnt "use a subclass", like its faking anything, the object is
> truly an object of that class. If you do User.find(1).class it might
> tell you that it is a moder
Marnen Laibow-Koser wrote:
> Newb Newb wrote:
>> Sharagoz -- wrote:
>>> You really should redesign this, but anyway
>>>
>>> "select * FROM logs where sender = 1 and receivers LIKE '%2%'" works if
>>> the receivers have one digit ID's.
>>>
>>> If not, you will probably have to do
>>> logs = Log.f
Conrad Taylor wrote:
> On Tue, Feb 2, 2010 at 2:08 PM, jiggy wrote:
>
>> I run a small RoR application on a company server. I try to install
>> my own list of gems because I would like to test new features, but the
>> admin did not want to install these because these may disrupt other
>> applica
Ray K. wrote:
> There are the bddcasts: www.bddcasts.com
> They do cost money, but they're worth it, so is the rspec book.
>
> A word of advice:
> Learning RoR at the same time with Cucumber and RSpec will require you
> to fight a very steep learning curve.
> Very often you will neither know how
> Myprojects controller
> class MyprojectsController < ApplicationController
> def index
> @myprojects = current_user.Project.all #< 'Project'
> reference here is getting an undefined method error
>
> respond_to do |format|
> forma
Taylor Strait wrote:
> Kristian - thanks for the reply. I think it would be easier, too! But...
> I was wondering if I am violating some kind of best practice to put all
> the fields in one model even if half of them will be empty most of the
> time?
i think it can sometimes be a fault to over-
> You also have button_tag but this won't create an html tag, it
> does though create a simple form wrapped around an input which means
> your backend gets a consistent result regardless of the browser
> ( is a bit inconsistent depending on the users browser).
oops i meant button_to .
--
Tom Mac wrote:
> Colin Law wrote:
>> 2010/1/25 Tom Mac :
>>> Hi
>>> � I have
>>> Create
>
> Not an error f.submit creates the html as
> value="Create" />
>
> But what I need is exactly
> Create
>
> If directly use this no problem But what I ould like to know an
> alternative in railshelp
Tom Mac wrote:
> Hi Jon Cox
>
>Thanks for your reply. My idea is to create a saas based application
> which has the initial signup procedure in basecamp like
>
> https://signup.37signals.com/basecamp/Basic/signup/new?source=signin-screen&__utma=1.193660493.1263811484.1
Tom Mac wrote:
> Hi
>> Consider this example:
>>
>>> organizations has_many employees
>>> employee belongs_to organization
>>employee belongs_to adminstered_organization
>
>Could you please specify the model structure and relation now?
maybe the requirement needs to be expanded a touch a
James Sullivan wrote:
> It's something I'm sure most of us, if not all, use in our text editor
> or
> IDE of choice yet there are so many different schemes out there. Syntax
> highlighting gives us the ability to see what we've done and if we've
> missed
> something in nothing more then a quick g
Rob Biedenharn wrote:
> On Jan 20, 2010, at 11:05 AM, Jon Cox wrote:
>>>>>> the
>>>>> the
>>>> Right, off to read the ruby tutorial to learn how to do this.
>>> into a
>> versions of the submit button. In the create method i'll
Jon Cox wrote:
> Jon Cox wrote:
>> Frederick Cheung wrote:
>>> On Jan 19, 3:10 pm, Jon Cox wrote:
>>>> So far i've taken the scaffolded new.html.erb file and tried to add a
>>>> 'button_to' that has an :action that contains the name o
Jon Cox wrote:
> Frederick Cheung wrote:
>> On Jan 19, 3:10 pm, Jon Cox wrote:
>>> So far i've taken the scaffolded new.html.erb file and tried to add a
>>> 'button_to' that has an :action that contains the name of a method i
>>> added to the co
Frederick Cheung wrote:
> On Jan 19, 3:10 pm, Jon Cox wrote:
>> So far i've taken the scaffolded new.html.erb file and tried to add a
>> 'button_to' that has an :action that contains the name of a method i
>> added to the controller. But the method doesn'
Hi guys,
I'd like to be able to display my 'new' view but have an intermediate
step before saving the new record using the 'create' button. Basically,
some of the data for the model is variable and dependant on a number
that the user needs to select. I envisaged a button along the lines of
'go get
Robert Walker wrote:
> If you have written your Cucumber stories and/or RSpec examples before
> all this work, using them to drive your design, then you are on the
> right track to good practice and design.
Thats great advice and was on my list of 'when i've got the basics down
i need to go and
ooh found 'has_many_and_belongs_to' in ActiveRecord that takes care of
the match->match_game<-game relationship nicely!
The solution i think i'm going to go with is to pre-load the game table
and add some methods to the game model to return a game or games in the
various ways i'll need them e.g
I'm just working through the Agile web dev book (which is great) and i'm
at the point i'd like to put together something to test my
understanding. Luckily I have a project that will help my gaming
community organise games on modern warfare 2. It also doesn't map onto
the depot like for like which i
MattWim wrote:
> Thanks for your input guys, I have sorted the problem with the simplest
> of
> solutions I should have tried earlier...
>
> Restarted my pc, something must have messed up maybe with MySQL or maybe
> with my browser. I just got so used to it being my dodgy code!! Amazing
> how
>
22 matches
Mail list logo