Colin, thanks for pointing out the fact that each asset, JS and CSS in
particular, are being fetched individually, that wouldn't happen with the
production asset pipeline running. Strange still about the way images are
being handled. By restarting the server, with the asset already placed
thi
Colin Law wrote in post #1182071:
> OK, I did not realise that you wanted to input a numeric value. The
> fact that it is an integer rather than, for example, a text string, is
> irrelevant to the form. You just need to use f.input. What you do
> with that in the controller, of course, is up to
Colin Law wrote in post #1182073:
> On 9 March 2016 at 21:51, David Williams wrote:
>> "articles"."category_id" = ? ORDER BY "articles"."created_at" DESC
>> [["category_id", 1]]
>>
>>
>> I'm getting undefined method `each' for #
>
> That is because you only have a single Article, not a collection
On 9 March 2016 at 21:51, David Williams wrote:
> In my articles model, I created a scope that links categories to their
> respective articles posts. When I use the rails console, the method
> works perfectly when I query the db.
>
> article.rb
>
> scope :category_technology, -> {where(category_id
In my articles model, I created a scope that links categories to their
respective articles posts. When I use the rails console, the method
works perfectly when I query the db.
article.rb
scope :category_technology, -> {where(category_id: 1)}
@articles.category_technology
Article Load (0.5ms) SE
On 9 March 2016 at 21:06, John Sanderbeck wrote:
> Colin Law wrote in post #1182068:
>> On 9 March 2016 at 16:43, John Sanderbeck wrote:
>> Firstly please quote the previous message when you reply, this is a
>> mailing list not a forum (though you may be accessing it via a forum
>> like interface
Hassan Schroeder wrote in post #1182051:
> On Tue, Mar 8, 2016 at 4:00 PM, David Williams
> wrote:
>
> ?! You're creating a form tag within a form tag - not valid HTML in
> any way. And that outer form has no method or action attributes, so
> not much is ever going to happen, as you see :-)
>
> --
Colin Law wrote in post #1182068:
> On 9 March 2016 at 16:43, John Sanderbeck wrote:
> Firstly please quote the previous message when you reply, this is a
> mailing list not a forum (though you may be accessing it via a forum
> like interface) so if you do not quote the previous message we have to
On 9 March 2016 at 16:43, John Sanderbeck wrote:
> I have watched many tutorials through CodeSchool, Railscasts, and the
> site you mentioned. None touch on exactly what I am trying to do.
>
> I know it's something simple, I just can't find a reference to what I
> want to do anywhere.
Firstly ple
I have watched many tutorials through CodeSchool, Railscasts, and the
site you mentioned. None touch on exactly what I am trying to do.
I know it's something simple, I just can't find a reference to what I
want to do anywhere.
John
--
Posted via http://www.ruby-forum.com/.
--
You received t
On 9 March 2016 at 14:43, John Sanderbeck wrote:
> ...
> Needless to say I am new to Rails and am struggling with the syntax.
I suggest that before continuing with your own project you work right
through a good tutorial such as railstutorial.org, which is free to
use online. That will show you t
I am working on a project and I setup a has_many through relationship
but am having a hard time figuring out how to display and edit it on a
form.
What I have is a Training Table, an Organization Table, and a join table
called Attendees
In Attendees I have the training_id, organization_id, and at
On 8 March 2016 at 23:22, Dave Bell wrote:
> I believe a similar thing is happen with my install of Rails 5. It appears
> to me that the development environment is attempting to serve assets via the
> pipeline. For my experiment I use an image_tag to pull down an image. In
> the first load case
On Tue, Mar 8, 2016 at 4:00 PM, David Williams wrote:
> When I click the submit button, the form automatically refreshes the
> page.
> Started GET
> "/articles/new?
utf8=%E2%9C%93&authenticity_token=GP%2Fm4GX2Z2CUjuFt5QJOEEcIcEtKzsd9nPGQ6OfmMQn2yiUHqwoGPvzQiu2hSiPK0V8%2Br1r%2F0TfC5zZM26Y2VA%3D%3D
I don't suppose anyone has written a script to update the http request
syntax to that required in rails 5 have they? The old format is
deprected in 5.0 but will presumably be removed in rails 5.1. The
warning is
DEPRECATION WARNING: ActionController::TestCase HTTP request methods
will accept onl
> ...
> At this point I discovered that coffeescript is not a superset of
> javascript. I copied the javascript line-for-line into a new coffeescript
> file and Rails barfed. I have never used coffeescript, but from the looks
> of things, I needed to learn fast.
Just for reference, I believe tha
I believe a similar thing is happen with my install of Rails 5. It appears
to me that the development environment is attempting to serve assets via
the pipeline. For my experiment I use an image_tag to pull down an image.
In the first load case the PNG requested is not present in
app/assets/
17 matches
Mail list logo