Hi,
Consider binding your form to an ActiveModel not an ActiveRecord class. In
your ActiveModel, you can add in the extra fields that you don't want/have
in your ActiveRecord class. Using ActiveModel will also let you follow the
same idioms in ActiveRecord, such as validation.
Thanks,
Henry
On 2
Hello all,
I would like to have a form in which some of the fields are linked to model
and some fields are not. When I use *form_for* tag it binds to a particular
model and I cannot create form fields that aren't correspond to one of the
column name of the table (Model). Hence what I think is I
Just gave this a quick look...
What strikes me as odd is this in your User validation:
validates :name, presence: true, length: { maximum: 50 },uniqueness: {
case_sensitive: false }
You want the user name unique yet you do not care about case sensitivity?
CAT, cat, Cat, caT
And then yo
Sorry, I see now blocker vs blocked. So same key name observations is
wrong...
On Saturday, June 27, 2015 at 9:50:29 PM UTC-4, Elizabeth McGurty wrote:
>
> With regard to button_to, on first (and quick) inspection, I see that you
> are missing your first argument, name.
>
> Your button_to:
>
With regard to button_to, on first (and quick) inspection, I see that you
are missing your first argument, name.
Your button_to:
<%= button_to blockrelationships_path, class: 'btn btn-default btn-xs',
params: {
blocker_callsign: @callsign,
On Sat, Jun 27, 2015 at 12:50 PM, Marco Dias wrote:
> I have a small PHP service that is being called in a JavaScript file by AJAX :
> I need to use this in my Rails application. I was wondering if I could
> put the .php file in a Rails folder, and simply call it.
No.
> Or if there's a way to d
On Jun 27, 2015, at 3:50 PM, Marco Dias wrote:
> I have a small PHP service that is being called in a JavaScript file by
> AJAX :
>
>$.ajax({
>type: "GET",
>url: "getDate.php",
>dataType:"json",
>data :{
> fromDate:fromDate,
> toDate:toDate
>},
>success: fu
In the view.html.erb:
<%= render @posts %>
In each _post.html.erb:
<%= render partial: 'shared/block', locals: { blockedcallsign: post.
callsign } %>
In each _block.html.erb:
<%= button_to blockrelationships_path, class: 'btn btn-default btn-xs',
params: {
In the view.html.erb:
<%= render @posts %>
In each _post.html.erb:
<%= render partial: 'shared/block', locals: { blockedcallsign: post.callsign
} %>
In each _block.html.erb:
<%= button_to blockrelationships_path, class: 'btn btn-default btn-xs',
params: {
I have a small PHP service that is being called in a JavaScript file by
AJAX :
$.ajax({
type: "GET",
url: "getDate.php",
dataType:"json",
data :{
fromDate:fromDate,
toDate:toDate
},
success: function(data) {
..
}
});
This service co
On 27 June 2015 at 15:25, David Williams wrote:
> Colin Law wrote in post #1175739:
>> On 26 June 2015 at 16:40, David Williams wrote:
"current_user.avatar.url(:thumb)"
>
>> Also what is the code
>> unless: avatar.nil?
>> supposed to be doing? I see no code setting up a variable avatar.
>>
Colin Law wrote in post #1175739:
> On 26 June 2015 at 16:40, David Williams wrote:
>>> "current_user.avatar.url(:thumb)"
> Also what is the code
> unless: avatar.nil?
> supposed to be doing? I see no code setting up a variable avatar.
>
> Colin
I fixed it! - Thanks, anyway.
--
Posted via htt
Thank you Elizabeth. I'm new to Rails so poking around in the Rails source
is insightful.
Usually the test case is a good guide for how to use a piece of code. The
interceptor is declared right inside the test case. The documentation and
the test seem to imply that I should declare the interce
To get started:
For Rails 3,
Railscasts: #206 Action Mailer in Rails 3
At Github, Rails ActionMailer, the interceptor test file is pretty
interesting, around line 642
https://github.com/rails/rails/blob/3e36db4406beea32772b1db1e9a16cc1e8aea14c/actionmailer/test/base_test.rb.
On Friday, June
14 matches
Mail list logo